import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * Auth0 allows you to configure your own phone messaging provider to help you manage, monitor, and troubleshoot your SMS and voice communications. You can only configure one phone provider for all SMS and voice communications per tenant. * * !> This resource manages to create a max of 1 phone provider for a tenant. * To avoid potential issues, it is recommended not to try creating multiple phone providers on the same tenant. * * !> If you are using the `auth0.PhoneProvider` resource to create a `custom` phone provider, you must ensure an action is created first with `custom-phone-provider` as the supportedTriggers * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as auth0 from "@pulumi/auth0"; * * // This is an example on how to set up the phone provider with Twilio. * const twilioPhoneProvider = new auth0.PhoneProvider("twilio_phone_provider", { * name: "twilio", * disabled: false, * credentials: { * authToken: "secretAuthToken", * }, * configuration: { * deliveryMethods: [ * "text", * "voice", * ], * defaultFrom: "+1234567890", * sid: "ACXXXXXXXXXXXXXXXX", * mssid: "MSXXXXXXXXXXXXXXXX", * }, * }); * // This is an example on how to set up the phone provider with a custom action. * // Make sure a corresponding action exists with custom-phone-provider as supported triggers * const sendCustomPhone = new auth0.Action("send_custom_phone", { * name: "Custom Phone Provider", * runtime: "node22", * deploy: true, * code: `/** * * Handler to be executed while sending a phone notification * * @param {Event} event - Details about the user and the context in which they are logging in. * * @param {CustomPhoneProviderAPI} api - Methods and utilities to help change the behavior of sending a phone notification. * */ * exports.onExecuteCustomPhoneProvider = async (event, api) => { * // Code goes here * return; * }; * `, * supportedTriggers: { * id: "custom-phone-provider", * version: "v1", * }, * }); * const customPhoneProvider = new auth0.PhoneProvider("custom_phone_provider", { * name: "custom", * disabled: false, * configuration: { * deliveryMethods: [ * "text", * "voice", * ], * }, * credentials: {}, * }, { * dependsOn: [sendCustomPhone], * }); * ``` * * ## Import * * This resource can be imported by specifying the phone Provider ID. * * Example: * * ```sh * $ pulumi import auth0:index/phoneProvider:PhoneProvider my_phone_provider "pro_XXXXXXXXXXXXXXXX" * ``` */ export declare class PhoneProvider extends pulumi.CustomResource { /** * Get an existing PhoneProvider 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?: PhoneProviderState, opts?: pulumi.CustomResourceOptions): PhoneProvider; /** * Returns true if the given object is an instance of PhoneProvider. 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 PhoneProvider; /** * The channel of the phone provider. */ readonly channel: pulumi.Output; /** * Specific phone provider settings. */ readonly configuration: pulumi.Output; /** * Provider credentials required to use authenticate to the provider. */ readonly credentials: pulumi.Output; /** * Indicates whether the phone provider is enabled (false) or disabled (true). */ readonly disabled: pulumi.Output; /** * Name of the phone provider. Options include `twilio`, `custom`. */ readonly name: pulumi.Output; /** * The tenant of the phone provider. */ readonly tenant: pulumi.Output; /** * Create a PhoneProvider 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: PhoneProviderArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering PhoneProvider resources. */ export interface PhoneProviderState { /** * The channel of the phone provider. */ channel?: pulumi.Input; /** * Specific phone provider settings. */ configuration?: pulumi.Input; /** * Provider credentials required to use authenticate to the provider. */ credentials?: pulumi.Input; /** * Indicates whether the phone provider is enabled (false) or disabled (true). */ disabled?: pulumi.Input; /** * Name of the phone provider. Options include `twilio`, `custom`. */ name?: pulumi.Input; /** * The tenant of the phone provider. */ tenant?: pulumi.Input; } /** * The set of arguments for constructing a PhoneProvider resource. */ export interface PhoneProviderArgs { /** * Specific phone provider settings. */ configuration: pulumi.Input; /** * Provider credentials required to use authenticate to the provider. */ credentials: pulumi.Input; /** * Indicates whether the phone provider is enabled (false) or disabled (true). */ disabled?: pulumi.Input; /** * Name of the phone provider. Options include `twilio`, `custom`. */ name?: pulumi.Input; }