import * as pulumi from "@pulumi/pulumi";
import { input as inputs, output as outputs } from "../types";
/**
 * Manages the identity providers within HuaweiCloud IAM service.
 *
 * > **NOTE:** 1. You *must* have admin privileges to use this resource.
 *   <br/>2. You can create up to 10 identity providers.
 *
 * ## Example Usage
 * ### Create a SAML protocol provider
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as fs from "fs";
 * import * as pulumi from "@huaweicloudos/pulumi";
 *
 * const provider1 = new huaweicloud.iam.Provider("provider1", {
 *     protocol: "saml",
 *     metadata: fs.readFileSync("/usr/local/data/files/metadata.txt"),
 * });
 * ```
 * ### Create a OpenID Connect protocol provider
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as pulumi from "@huaweicloudos/pulumi";
 *
 * const provider2 = new huaweicloud.iam.Provider("provider2", {
 *     protocol: "oidc",
 *     accessConfig: {
 *         accessType: "program_console",
 *         providerUrl: "https://accounts.example.com",
 *         clientId: "your_client_id",
 *         authorizationEndpoint: "https://accounts.example.com/o/oauth2/v2/auth",
 *         scopes: ["openid"],
 *         signingKey: JSON.stringify({
 *             keys: [{
 *                 alg: "RS256",
 *                 e: "AQAB",
 *                 kid: "...",
 *                 kty: "RSA",
 *                 n: "...",
 *                 use: "sig",
 *             }],
 *         }),
 *     },
 * });
 * ```
 *
 * <!--markdownlint-disable MD033-->
 *
 * ## Import
 *
 * Identity provider can be imported using the `name`, e.g. bash
 *
 * ```sh
 *  $ pulumi import huaweicloud:Iam/provider:Provider provider_1 example_com_provider_saml
 * ```
 */
export declare class Provider extends pulumi.CustomResource {
    /**
     * Get an existing Provider 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: string, id: pulumi.Input<pulumi.ID>, state?: ProviderState, opts?: pulumi.CustomResourceOptions): Provider;
    /**
     * Returns true if the given object is an instance of Provider.  This is designed to work even
     * when multiple copies of the Pulumi SDK have been loaded into the same process.
     */
    static isInstance(obj: any): obj is Provider;
    /**
     * Specifies the description of the identity provider.
     * This field is required only if the protocol is set to *oidc*.
     */
    readonly accessConfig: pulumi.Output<outputs.Iam.ProviderAccessConfig | undefined>;
    /**
     * The identity conversion rules of the identity provider.
     * The object structure is documented below
     */
    readonly conversionRules: pulumi.Output<outputs.Iam.ProviderConversionRule[]>;
    /**
     * Specifies the description of the identity provider.
     */
    readonly description: pulumi.Output<string | undefined>;
    /**
     * The login link of the identity provider.
     */
    readonly loginLink: pulumi.Output<string>;
    /**
     * Specifies the metadata of the IDP(Identity Provider) server.
     * To obtain the metadata file of your enterprise IDP, contact the enterprise administrator.
     * This field is used to import a metadata file to IAM to implement federated identity authentication.
     * This field is required only if the protocol is set to *saml*.
     * The maximum length is 30,000 characters and it stores in the state with SHA1 algorithm.
     */
    readonly metadata: pulumi.Output<string | undefined>;
    /**
     * Specifies the name of the identity provider to be registered.
     * The maximum length is `64` characters. Only letters, digits, underscores (_), and hyphens (-) are allowed.
     * The name is unique, it is recommended to include domain name information.
     * Changing this creates a new resource.
     */
    readonly name: pulumi.Output<string>;
    /**
     * Specifies the protocol of the identity provider.
     * Valid values are **saml** and **oidc**. Changing this creates a new resource.
     */
    readonly protocol: pulumi.Output<string>;
    /**
     * Specifies the single sign-on type of the identity provider.
     * Valid values are as follows:
     * + **virtual_user_sso**: After a federated user logs in to HuaweiCloud, the system automatically creates a virtual user
     * and assigns permissions to the user based on identity conversion rules.
     * + **iam_user_sso**: After a federated user logs in to HuaweiCloud, the system automatically maps the external identity
     * ID to an IAM user so that the federated user has the permissions of the mapped IAM user.
     */
    readonly ssoType: pulumi.Output<string>;
    /**
     * Enabled status for the identity provider. Defaults to true.
     */
    readonly status: pulumi.Output<boolean | undefined>;
    /**
     * Create a Provider resource with the given unique name, arguments, and options.
     *
     * @param name The _unique_ name of the resource.
     * @param args The arguments to use to populate this resource's properties.
     * @param opts A bag of options that control this resource's behavior.
     */
    constructor(name: string, args: ProviderArgs, opts?: pulumi.CustomResourceOptions);
}
/**
 * Input properties used for looking up and filtering Provider resources.
 */
export interface ProviderState {
    /**
     * Specifies the description of the identity provider.
     * This field is required only if the protocol is set to *oidc*.
     */
    accessConfig?: pulumi.Input<inputs.Iam.ProviderAccessConfig>;
    /**
     * The identity conversion rules of the identity provider.
     * The object structure is documented below
     */
    conversionRules?: pulumi.Input<pulumi.Input<inputs.Iam.ProviderConversionRule>[]>;
    /**
     * Specifies the description of the identity provider.
     */
    description?: pulumi.Input<string>;
    /**
     * The login link of the identity provider.
     */
    loginLink?: pulumi.Input<string>;
    /**
     * Specifies the metadata of the IDP(Identity Provider) server.
     * To obtain the metadata file of your enterprise IDP, contact the enterprise administrator.
     * This field is used to import a metadata file to IAM to implement federated identity authentication.
     * This field is required only if the protocol is set to *saml*.
     * The maximum length is 30,000 characters and it stores in the state with SHA1 algorithm.
     */
    metadata?: pulumi.Input<string>;
    /**
     * Specifies the name of the identity provider to be registered.
     * The maximum length is `64` characters. Only letters, digits, underscores (_), and hyphens (-) are allowed.
     * The name is unique, it is recommended to include domain name information.
     * Changing this creates a new resource.
     */
    name?: pulumi.Input<string>;
    /**
     * Specifies the protocol of the identity provider.
     * Valid values are **saml** and **oidc**. Changing this creates a new resource.
     */
    protocol?: pulumi.Input<string>;
    /**
     * Specifies the single sign-on type of the identity provider.
     * Valid values are as follows:
     * + **virtual_user_sso**: After a federated user logs in to HuaweiCloud, the system automatically creates a virtual user
     * and assigns permissions to the user based on identity conversion rules.
     * + **iam_user_sso**: After a federated user logs in to HuaweiCloud, the system automatically maps the external identity
     * ID to an IAM user so that the federated user has the permissions of the mapped IAM user.
     */
    ssoType?: pulumi.Input<string>;
    /**
     * Enabled status for the identity provider. Defaults to true.
     */
    status?: pulumi.Input<boolean>;
}
/**
 * The set of arguments for constructing a Provider resource.
 */
export interface ProviderArgs {
    /**
     * Specifies the description of the identity provider.
     * This field is required only if the protocol is set to *oidc*.
     */
    accessConfig?: pulumi.Input<inputs.Iam.ProviderAccessConfig>;
    /**
     * Specifies the description of the identity provider.
     */
    description?: pulumi.Input<string>;
    /**
     * Specifies the metadata of the IDP(Identity Provider) server.
     * To obtain the metadata file of your enterprise IDP, contact the enterprise administrator.
     * This field is used to import a metadata file to IAM to implement federated identity authentication.
     * This field is required only if the protocol is set to *saml*.
     * The maximum length is 30,000 characters and it stores in the state with SHA1 algorithm.
     */
    metadata?: pulumi.Input<string>;
    /**
     * Specifies the name of the identity provider to be registered.
     * The maximum length is `64` characters. Only letters, digits, underscores (_), and hyphens (-) are allowed.
     * The name is unique, it is recommended to include domain name information.
     * Changing this creates a new resource.
     */
    name?: pulumi.Input<string>;
    /**
     * Specifies the protocol of the identity provider.
     * Valid values are **saml** and **oidc**. Changing this creates a new resource.
     */
    protocol: pulumi.Input<string>;
    /**
     * Specifies the single sign-on type of the identity provider.
     * Valid values are as follows:
     * + **virtual_user_sso**: After a federated user logs in to HuaweiCloud, the system automatically creates a virtual user
     * and assigns permissions to the user based on identity conversion rules.
     * + **iam_user_sso**: After a federated user logs in to HuaweiCloud, the system automatically maps the external identity
     * ID to an IAM user so that the federated user has the permissions of the mapped IAM user.
     */
    ssoType?: pulumi.Input<string>;
    /**
     * Enabled status for the identity provider. Defaults to true.
     */
    status?: pulumi.Input<boolean>;
}
