Manages phone notification templates used for SMS and voice communications in Auth0.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as auth0 from "@pulumi/auth0";
// Phone Notification Template - OTP Enrollment
// Configure the OTP enrollment phone notification template with SMS and voice support.
const otpEnrollment = new auth0.BrandingPhoneNotificationTemplate("otp_enrollment", {
type: "otp_enroll",
disabled: false,
content: {
from: "+1234567890",
body: {
text: "Your enrollment code is: @{code}",
voice: "Your enrollment code is @{code}",
},
},
});
// Phone Notification Template - OTP Verification
// Configure the OTP verification phone notification template.
const otpVerification = new auth0.BrandingPhoneNotificationTemplate("otp_verification", {
type: "otp_verify",
disabled: false,
content: {
from: "+1234567890",
body: {
text: "Your verification code is: @{code}",
voice: "Your verification code is @{code}",
},
},
});
import pulumi
import pulumi_auth0 as auth0
# Phone Notification Template - OTP Enrollment
# Configure the OTP enrollment phone notification template with SMS and voice support.
otp_enrollment = auth0.BrandingPhoneNotificationTemplate("otp_enrollment",
type="otp_enroll",
disabled=False,
content={
"from_": "+1234567890",
"body": {
"text": "Your enrollment code is: @{code}",
"voice": "Your enrollment code is @{code}",
},
})
# Phone Notification Template - OTP Verification
# Configure the OTP verification phone notification template.
otp_verification = auth0.BrandingPhoneNotificationTemplate("otp_verification",
type="otp_verify",
disabled=False,
content={
"from_": "+1234567890",
"body": {
"text": "Your verification code is: @{code}",
"voice": "Your verification code is @{code}",
},
})
package main
import (
"github.com/pulumi/pulumi-auth0/sdk/v3/go/auth0"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Phone Notification Template - OTP Enrollment
// Configure the OTP enrollment phone notification template with SMS and voice support.
_, err := auth0.NewBrandingPhoneNotificationTemplate(ctx, "otp_enrollment", &auth0.BrandingPhoneNotificationTemplateArgs{
Type: pulumi.String("otp_enroll"),
Disabled: pulumi.Bool(false),
Content: &auth0.BrandingPhoneNotificationTemplateContentArgs{
From: pulumi.String("+1234567890"),
Body: &auth0.BrandingPhoneNotificationTemplateContentBodyArgs{
Text: pulumi.String("Your enrollment code is: @{code}"),
Voice: pulumi.String("Your enrollment code is @{code}"),
},
},
})
if err != nil {
return err
}
// Phone Notification Template - OTP Verification
// Configure the OTP verification phone notification template.
_, err = auth0.NewBrandingPhoneNotificationTemplate(ctx, "otp_verification", &auth0.BrandingPhoneNotificationTemplateArgs{
Type: pulumi.String("otp_verify"),
Disabled: pulumi.Bool(false),
Content: &auth0.BrandingPhoneNotificationTemplateContentArgs{
From: pulumi.String("+1234567890"),
Body: &auth0.BrandingPhoneNotificationTemplateContentBodyArgs{
Text: pulumi.String("Your verification code is: @{code}"),
Voice: pulumi.String("Your verification code is @{code}"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Auth0 = Pulumi.Auth0;
return await Deployment.RunAsync(() =>
{
// Phone Notification Template - OTP Enrollment
// Configure the OTP enrollment phone notification template with SMS and voice support.
var otpEnrollment = new Auth0.BrandingPhoneNotificationTemplate("otp_enrollment", new()
{
Type = "otp_enroll",
Disabled = false,
Content = new Auth0.Inputs.BrandingPhoneNotificationTemplateContentArgs
{
From = "+1234567890",
Body = new Auth0.Inputs.BrandingPhoneNotificationTemplateContentBodyArgs
{
Text = "Your enrollment code is: @{code}",
Voice = "Your enrollment code is @{code}",
},
},
});
// Phone Notification Template - OTP Verification
// Configure the OTP verification phone notification template.
var otpVerification = new Auth0.BrandingPhoneNotificationTemplate("otp_verification", new()
{
Type = "otp_verify",
Disabled = false,
Content = new Auth0.Inputs.BrandingPhoneNotificationTemplateContentArgs
{
From = "+1234567890",
Body = new Auth0.Inputs.BrandingPhoneNotificationTemplateContentBodyArgs
{
Text = "Your verification code is: @{code}",
Voice = "Your verification code is @{code}",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.auth0.BrandingPhoneNotificationTemplate;
import com.pulumi.auth0.BrandingPhoneNotificationTemplateArgs;
import com.pulumi.auth0.inputs.BrandingPhoneNotificationTemplateContentArgs;
import com.pulumi.auth0.inputs.BrandingPhoneNotificationTemplateContentBodyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
// Phone Notification Template - OTP Enrollment
// Configure the OTP enrollment phone notification template with SMS and voice support.
var otpEnrollment = new BrandingPhoneNotificationTemplate("otpEnrollment", BrandingPhoneNotificationTemplateArgs.builder()
.type("otp_enroll")
.disabled(false)
.content(BrandingPhoneNotificationTemplateContentArgs.builder()
.from("+1234567890")
.body(BrandingPhoneNotificationTemplateContentBodyArgs.builder()
.text("Your enrollment code is: @{code}")
.voice("Your enrollment code is @{code}")
.build())
.build())
.build());
// Phone Notification Template - OTP Verification
// Configure the OTP verification phone notification template.
var otpVerification = new BrandingPhoneNotificationTemplate("otpVerification", BrandingPhoneNotificationTemplateArgs.builder()
.type("otp_verify")
.disabled(false)
.content(BrandingPhoneNotificationTemplateContentArgs.builder()
.from("+1234567890")
.body(BrandingPhoneNotificationTemplateContentBodyArgs.builder()
.text("Your verification code is: @{code}")
.voice("Your verification code is @{code}")
.build())
.build())
.build());
}
}
resources:
# Phone Notification Template - OTP Enrollment
# Configure the OTP enrollment phone notification template with SMS and voice support.
otpEnrollment:
type: auth0:BrandingPhoneNotificationTemplate
name: otp_enrollment
properties:
type: otp_enroll
disabled: false
content:
from: '+1234567890'
body:
text: 'Your enrollment code is: @{code}'
voice: Your enrollment code is @{code}
# Phone Notification Template - OTP Verification
# Configure the OTP verification phone notification template.
otpVerification:
type: auth0:BrandingPhoneNotificationTemplate
name: otp_verification
properties:
type: otp_verify
disabled: false
content:
from: '+1234567890'
body:
text: 'Your verification code is: @{code}'
voice: Your verification code is @{code}
Create BrandingPhoneNotificationTemplate Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new BrandingPhoneNotificationTemplate(name: string, args: BrandingPhoneNotificationTemplateArgs, opts?: CustomResourceOptions);@overload
def BrandingPhoneNotificationTemplate(resource_name: str,
args: BrandingPhoneNotificationTemplateArgs,
opts: Optional[ResourceOptions] = None)
@overload
def BrandingPhoneNotificationTemplate(resource_name: str,
opts: Optional[ResourceOptions] = None,
type: Optional[str] = None,
content: Optional[BrandingPhoneNotificationTemplateContentArgs] = None,
disabled: Optional[bool] = None)func NewBrandingPhoneNotificationTemplate(ctx *Context, name string, args BrandingPhoneNotificationTemplateArgs, opts ...ResourceOption) (*BrandingPhoneNotificationTemplate, error)public BrandingPhoneNotificationTemplate(string name, BrandingPhoneNotificationTemplateArgs args, CustomResourceOptions? opts = null)
public BrandingPhoneNotificationTemplate(String name, BrandingPhoneNotificationTemplateArgs args)
public BrandingPhoneNotificationTemplate(String name, BrandingPhoneNotificationTemplateArgs args, CustomResourceOptions options)
type: auth0:BrandingPhoneNotificationTemplate
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args BrandingPhoneNotificationTemplateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args BrandingPhoneNotificationTemplateArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args BrandingPhoneNotificationTemplateArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BrandingPhoneNotificationTemplateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args BrandingPhoneNotificationTemplateArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var brandingPhoneNotificationTemplateResource = new Auth0.BrandingPhoneNotificationTemplate("brandingPhoneNotificationTemplateResource", new()
{
Type = "string",
Content = new Auth0.Inputs.BrandingPhoneNotificationTemplateContentArgs
{
Body = new Auth0.Inputs.BrandingPhoneNotificationTemplateContentBodyArgs
{
Text = "string",
Voice = "string",
},
From = "string",
Syntax = "string",
},
Disabled = false,
});
example, err := auth0.NewBrandingPhoneNotificationTemplate(ctx, "brandingPhoneNotificationTemplateResource", &auth0.BrandingPhoneNotificationTemplateArgs{
Type: pulumi.String("string"),
Content: &auth0.BrandingPhoneNotificationTemplateContentArgs{
Body: &auth0.BrandingPhoneNotificationTemplateContentBodyArgs{
Text: pulumi.String("string"),
Voice: pulumi.String("string"),
},
From: pulumi.String("string"),
Syntax: pulumi.String("string"),
},
Disabled: pulumi.Bool(false),
})
var brandingPhoneNotificationTemplateResource = new BrandingPhoneNotificationTemplate("brandingPhoneNotificationTemplateResource", BrandingPhoneNotificationTemplateArgs.builder()
.type("string")
.content(BrandingPhoneNotificationTemplateContentArgs.builder()
.body(BrandingPhoneNotificationTemplateContentBodyArgs.builder()
.text("string")
.voice("string")
.build())
.from("string")
.syntax("string")
.build())
.disabled(false)
.build());
branding_phone_notification_template_resource = auth0.BrandingPhoneNotificationTemplate("brandingPhoneNotificationTemplateResource",
type="string",
content={
"body": {
"text": "string",
"voice": "string",
},
"from_": "string",
"syntax": "string",
},
disabled=False)
const brandingPhoneNotificationTemplateResource = new auth0.BrandingPhoneNotificationTemplate("brandingPhoneNotificationTemplateResource", {
type: "string",
content: {
body: {
text: "string",
voice: "string",
},
from: "string",
syntax: "string",
},
disabled: false,
});
type: auth0:BrandingPhoneNotificationTemplate
properties:
content:
body:
text: string
voice: string
from: string
syntax: string
disabled: false
type: string
BrandingPhoneNotificationTemplate Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The BrandingPhoneNotificationTemplate resource accepts the following input properties:
- Type string
- The type of the phone notification template.
- Content
Branding
Phone Notification Template Content - The content of the phone notification template.
- Disabled bool
- Indicates whether the phone notification template is disabled.
- Type string
- The type of the phone notification template.
- Content
Branding
Phone Notification Template Content Args - The content of the phone notification template.
- Disabled bool
- Indicates whether the phone notification template is disabled.
- type String
- The type of the phone notification template.
- content
Branding
Phone Notification Template Content - The content of the phone notification template.
- disabled Boolean
- Indicates whether the phone notification template is disabled.
- type string
- The type of the phone notification template.
- content
Branding
Phone Notification Template Content - The content of the phone notification template.
- disabled boolean
- Indicates whether the phone notification template is disabled.
- type str
- The type of the phone notification template.
- content
Branding
Phone Notification Template Content Args - The content of the phone notification template.
- disabled bool
- Indicates whether the phone notification template is disabled.
- type String
- The type of the phone notification template.
- content Property Map
- The content of the phone notification template.
- disabled Boolean
- Indicates whether the phone notification template is disabled.
Outputs
All input properties are implicitly available as output properties. Additionally, the BrandingPhoneNotificationTemplate resource produces the following output properties:
- Channel string
- The channel of the phone notification template (e.g.,
sms,voice). - Customizable bool
- Indicates whether the phone notification template is customizable.
- Id string
- The provider-assigned unique ID for this managed resource.
- Template
Id string - The ID of the phone notification template.
- Tenant string
- The tenant of the phone notification template.
- Channel string
- The channel of the phone notification template (e.g.,
sms,voice). - Customizable bool
- Indicates whether the phone notification template is customizable.
- Id string
- The provider-assigned unique ID for this managed resource.
- Template
Id string - The ID of the phone notification template.
- Tenant string
- The tenant of the phone notification template.
- channel String
- The channel of the phone notification template (e.g.,
sms,voice). - customizable Boolean
- Indicates whether the phone notification template is customizable.
- id String
- The provider-assigned unique ID for this managed resource.
- template
Id String - The ID of the phone notification template.
- tenant String
- The tenant of the phone notification template.
- channel string
- The channel of the phone notification template (e.g.,
sms,voice). - customizable boolean
- Indicates whether the phone notification template is customizable.
- id string
- The provider-assigned unique ID for this managed resource.
- template
Id string - The ID of the phone notification template.
- tenant string
- The tenant of the phone notification template.
- channel str
- The channel of the phone notification template (e.g.,
sms,voice). - customizable bool
- Indicates whether the phone notification template is customizable.
- id str
- The provider-assigned unique ID for this managed resource.
- template_
id str - The ID of the phone notification template.
- tenant str
- The tenant of the phone notification template.
- channel String
- The channel of the phone notification template (e.g.,
sms,voice). - customizable Boolean
- Indicates whether the phone notification template is customizable.
- id String
- The provider-assigned unique ID for this managed resource.
- template
Id String - The ID of the phone notification template.
- tenant String
- The tenant of the phone notification template.
Look up Existing BrandingPhoneNotificationTemplate Resource
Get an existing BrandingPhoneNotificationTemplate resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: BrandingPhoneNotificationTemplateState, opts?: CustomResourceOptions): BrandingPhoneNotificationTemplate@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
channel: Optional[str] = None,
content: Optional[BrandingPhoneNotificationTemplateContentArgs] = None,
customizable: Optional[bool] = None,
disabled: Optional[bool] = None,
template_id: Optional[str] = None,
tenant: Optional[str] = None,
type: Optional[str] = None) -> BrandingPhoneNotificationTemplatefunc GetBrandingPhoneNotificationTemplate(ctx *Context, name string, id IDInput, state *BrandingPhoneNotificationTemplateState, opts ...ResourceOption) (*BrandingPhoneNotificationTemplate, error)public static BrandingPhoneNotificationTemplate Get(string name, Input<string> id, BrandingPhoneNotificationTemplateState? state, CustomResourceOptions? opts = null)public static BrandingPhoneNotificationTemplate get(String name, Output<String> id, BrandingPhoneNotificationTemplateState state, CustomResourceOptions options)resources: _: type: auth0:BrandingPhoneNotificationTemplate get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Channel string
- The channel of the phone notification template (e.g.,
sms,voice). - Content
Branding
Phone Notification Template Content - The content of the phone notification template.
- Customizable bool
- Indicates whether the phone notification template is customizable.
- Disabled bool
- Indicates whether the phone notification template is disabled.
- Template
Id string - The ID of the phone notification template.
- Tenant string
- The tenant of the phone notification template.
- Type string
- The type of the phone notification template.
- Channel string
- The channel of the phone notification template (e.g.,
sms,voice). - Content
Branding
Phone Notification Template Content Args - The content of the phone notification template.
- Customizable bool
- Indicates whether the phone notification template is customizable.
- Disabled bool
- Indicates whether the phone notification template is disabled.
- Template
Id string - The ID of the phone notification template.
- Tenant string
- The tenant of the phone notification template.
- Type string
- The type of the phone notification template.
- channel String
- The channel of the phone notification template (e.g.,
sms,voice). - content
Branding
Phone Notification Template Content - The content of the phone notification template.
- customizable Boolean
- Indicates whether the phone notification template is customizable.
- disabled Boolean
- Indicates whether the phone notification template is disabled.
- template
Id String - The ID of the phone notification template.
- tenant String
- The tenant of the phone notification template.
- type String
- The type of the phone notification template.
- channel string
- The channel of the phone notification template (e.g.,
sms,voice). - content
Branding
Phone Notification Template Content - The content of the phone notification template.
- customizable boolean
- Indicates whether the phone notification template is customizable.
- disabled boolean
- Indicates whether the phone notification template is disabled.
- template
Id string - The ID of the phone notification template.
- tenant string
- The tenant of the phone notification template.
- type string
- The type of the phone notification template.
- channel str
- The channel of the phone notification template (e.g.,
sms,voice). - content
Branding
Phone Notification Template Content Args - The content of the phone notification template.
- customizable bool
- Indicates whether the phone notification template is customizable.
- disabled bool
- Indicates whether the phone notification template is disabled.
- template_
id str - The ID of the phone notification template.
- tenant str
- The tenant of the phone notification template.
- type str
- The type of the phone notification template.
- channel String
- The channel of the phone notification template (e.g.,
sms,voice). - content Property Map
- The content of the phone notification template.
- customizable Boolean
- Indicates whether the phone notification template is customizable.
- disabled Boolean
- Indicates whether the phone notification template is disabled.
- template
Id String - The ID of the phone notification template.
- tenant String
- The tenant of the phone notification template.
- type String
- The type of the phone notification template.
Supporting Types
BrandingPhoneNotificationTemplateContent, BrandingPhoneNotificationTemplateContentArgs
- Body
Branding
Phone Notification Template Content Body - The body content of the phone notification template.
- From string
- The sender phone number for SMS or voice notifications.
- Syntax string
- The syntax of the phone notification template.
- Body
Branding
Phone Notification Template Content Body - The body content of the phone notification template.
- From string
- The sender phone number for SMS or voice notifications.
- Syntax string
- The syntax of the phone notification template.
- body
Branding
Phone Notification Template Content Body - The body content of the phone notification template.
- from String
- The sender phone number for SMS or voice notifications.
- syntax String
- The syntax of the phone notification template.
- body
Branding
Phone Notification Template Content Body - The body content of the phone notification template.
- from string
- The sender phone number for SMS or voice notifications.
- syntax string
- The syntax of the phone notification template.
- body
Branding
Phone Notification Template Content Body - The body content of the phone notification template.
- from_ str
- The sender phone number for SMS or voice notifications.
- syntax str
- The syntax of the phone notification template.
- body Property Map
- The body content of the phone notification template.
- from String
- The sender phone number for SMS or voice notifications.
- syntax String
- The syntax of the phone notification template.
BrandingPhoneNotificationTemplateContentBody, BrandingPhoneNotificationTemplateContentBodyArgs
Import
#!/bin/bash
Example: Import an existing Auth0 phone notification template into Terraform state
Replace TEMPLATE_ID with the actual template ID from your Auth0 tenant
$ pulumi import auth0:index/brandingPhoneNotificationTemplate:BrandingPhoneNotificationTemplate otp_enrollment "tem_xxxxxxxxxxxxxxxxxxx"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Auth0 pulumi/pulumi-auth0
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
auth0Terraform Provider.
