"use strict";
// *** 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.OidcProvider = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Provides a resource to manage iam oidc provider
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as volcengine from "@volcengine/pulumi";
 *
 * const foo = new volcengine.iam.OidcProvider("foo", {
 *     clientIds: ["6c505fb67d32417c8de287ee1fa89fc1"],
 *     description: "acc-test-oidc",
 *     issuanceLimitTime: 6,
 *     issuerUrl: "https://security-api.snssdk.com/qa/sso/oidc/6c505fb67d32417c8de287ee1fa89fc1",
 *     oidcProviderName: "oidc_provider",
 *     thumbprints: ["9b1afaa2dfca349fe38c5ef3e72ee03cb0696d65ea2e11f597ea9aa55fcff33a"],
 * });
 * ```
 *
 * ## Import
 *
 * IamOidcProvider can be imported using the id, e.g.
 *
 * ```sh
 * $ pulumi import volcengine:iam/oidcProvider:OidcProvider default resource_id
 * ```
 */
class OidcProvider extends pulumi.CustomResource {
    /**
     * Get an existing OidcProvider 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 OidcProvider(name, state, Object.assign(Object.assign({}, opts), { id: id }));
    }
    /**
     * Returns true if the given object is an instance of OidcProvider.  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'] === OidcProvider.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["clientIds"] = state ? state.clientIds : undefined;
            resourceInputs["createDate"] = state ? state.createDate : undefined;
            resourceInputs["description"] = state ? state.description : undefined;
            resourceInputs["issuanceLimitTime"] = state ? state.issuanceLimitTime : undefined;
            resourceInputs["issuerUrl"] = state ? state.issuerUrl : undefined;
            resourceInputs["oidcProviderName"] = state ? state.oidcProviderName : undefined;
            resourceInputs["thumbprints"] = state ? state.thumbprints : undefined;
            resourceInputs["trn"] = state ? state.trn : undefined;
            resourceInputs["updateDate"] = state ? state.updateDate : undefined;
        }
        else {
            const args = argsOrState;
            if ((!args || args.clientIds === undefined) && !opts.urn) {
                throw new Error("Missing required property 'clientIds'");
            }
            if ((!args || args.issuerUrl === undefined) && !opts.urn) {
                throw new Error("Missing required property 'issuerUrl'");
            }
            if ((!args || args.oidcProviderName === undefined) && !opts.urn) {
                throw new Error("Missing required property 'oidcProviderName'");
            }
            if ((!args || args.thumbprints === undefined) && !opts.urn) {
                throw new Error("Missing required property 'thumbprints'");
            }
            resourceInputs["clientIds"] = args ? args.clientIds : undefined;
            resourceInputs["description"] = args ? args.description : undefined;
            resourceInputs["issuanceLimitTime"] = args ? args.issuanceLimitTime : undefined;
            resourceInputs["issuerUrl"] = args ? args.issuerUrl : undefined;
            resourceInputs["oidcProviderName"] = args ? args.oidcProviderName : undefined;
            resourceInputs["thumbprints"] = args ? args.thumbprints : undefined;
            resourceInputs["createDate"] = undefined /*out*/;
            resourceInputs["trn"] = undefined /*out*/;
            resourceInputs["updateDate"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(OidcProvider.__pulumiType, name, resourceInputs, opts);
    }
}
exports.OidcProvider = OidcProvider;
/** @internal */
OidcProvider.__pulumiType = 'volcengine:iam/oidcProvider:OidcProvider';
//# sourceMappingURL=oidcProvider.js.map