import * as pulumi from "@pulumi/pulumi"; /** * Creates an OAuth2 service account. * * ## Example Usage * * An OAuth2 client for an app hosted at `my-app.com`, that uses the authorization code flow to authenticate. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as ovh from "@ovhcloud/pulumi-ovh"; * * const myOauth2ClientAuthCode = new ovh.me.APIOAuth2Client("my_oauth2_client_auth_code", { * name: "OAuth2 authorization code service account", * flow: "AUTHORIZATION_CODE", * description: "An OAuth2 client using the authorization code flow for my-app.com", * callbackUrls: ["https://my-app.com/callback"], * }); * ``` * * An OAuth2 client for an app hosted at `my-app.com`, that uses the client credentials flow to authenticate. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as ovh from "@ovhcloud/pulumi-ovh"; * * const myOauth2ClientClientCreds = new ovh.me.APIOAuth2Client("my_oauth2_client_client_creds", { * name: "client credentials service account", * description: "An OAuth2 client using the client credentials flow for my app", * flow: "CLIENT_CREDENTIALS", * }); * ``` * * ## Import * * OAuth2 clients can be imported using their `client_id`: * * bash * * ```sh * $ pulumi import ovh:Me/aPIOAuth2Client:APIOAuth2Client my_oauth2_client client_id * ``` * * Because the client_secret is only available for resources created using terraform, OAuth2 clients can also be imported using a `client_id` and a `client_secret` with a pipe separator: * * bash * * ```sh * $ pulumi import ovh:Me/aPIOAuth2Client:APIOAuth2Client my_oauth2_client 'client_id|client_secret' * ``` */ export declare class APIOAuth2Client extends pulumi.CustomResource { /** * Get an existing APIOAuth2Client 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, state?: APIOAuth2ClientState, opts?: pulumi.CustomResourceOptions): APIOAuth2Client; /** * Returns true if the given object is an instance of APIOAuth2Client. 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 APIOAuth2Client; /** * List of callback urls when configuring the `AUTHORIZATION_CODE` flow. */ readonly callbackUrls: pulumi.Output; /** * Client ID of the created service account. */ readonly clientId: pulumi.Output; /** * Client secret of the created service account. */ readonly clientSecret: pulumi.Output; /** * OAuth2 client description. */ readonly description: pulumi.Output; /** * The OAuth2 flow to use. `AUTHORIZATION_CODE` or `CLIENT_CREDENTIALS` are supported at the moment. */ readonly flow: pulumi.Output; /** * Identity URN of the service account to be used inside an IAM policy. */ readonly identity: pulumi.Output; /** * OAuth2 client name. */ readonly name: pulumi.Output; /** * Create a APIOAuth2Client 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: APIOAuth2ClientArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering APIOAuth2Client resources. */ export interface APIOAuth2ClientState { /** * List of callback urls when configuring the `AUTHORIZATION_CODE` flow. */ callbackUrls?: pulumi.Input[]>; /** * Client ID of the created service account. */ clientId?: pulumi.Input; /** * Client secret of the created service account. */ clientSecret?: pulumi.Input; /** * OAuth2 client description. */ description?: pulumi.Input; /** * The OAuth2 flow to use. `AUTHORIZATION_CODE` or `CLIENT_CREDENTIALS` are supported at the moment. */ flow?: pulumi.Input; /** * Identity URN of the service account to be used inside an IAM policy. */ identity?: pulumi.Input; /** * OAuth2 client name. */ name?: pulumi.Input; } /** * The set of arguments for constructing a APIOAuth2Client resource. */ export interface APIOAuth2ClientArgs { /** * List of callback urls when configuring the `AUTHORIZATION_CODE` flow. */ callbackUrls?: pulumi.Input[]>; /** * OAuth2 client description. */ description: pulumi.Input; /** * The OAuth2 flow to use. `AUTHORIZATION_CODE` or `CLIENT_CREDENTIALS` are supported at the moment. */ flow: pulumi.Input; /** * OAuth2 client name. */ name?: pulumi.Input; }