published on Sunday, Oct 11, 2026 by Descope
published on Sunday, Oct 11, 2026 by Descope
Manages a single voice call message template for an authentication method in a Descope project. The active template is selected on the method’s settings resource, e.g. the voiceTemplateId attribute of descope.OtpSettings.
Create VoiceTemplate Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new VoiceTemplate(name: string, args: VoiceTemplateArgs, opts?: CustomResourceOptions);@overload
def VoiceTemplate(resource_name: str,
args: VoiceTemplateArgs,
opts: Optional[ResourceOptions] = None)
@overload
def VoiceTemplate(resource_name: str,
opts: Optional[ResourceOptions] = None,
body: Optional[str] = None,
method: Optional[str] = None,
project_id: Optional[str] = None,
name: Optional[str] = None)func NewVoiceTemplate(ctx *Context, name string, args VoiceTemplateArgs, opts ...ResourceOption) (*VoiceTemplate, error)public VoiceTemplate(string name, VoiceTemplateArgs args, CustomResourceOptions? opts = null)
public VoiceTemplate(String name, VoiceTemplateArgs args)
public VoiceTemplate(String name, VoiceTemplateArgs args, CustomResourceOptions options)
type: descope:VoiceTemplate
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "descope_voice_template" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args VoiceTemplateArgs
- 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 VoiceTemplateArgs
- 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 VoiceTemplateArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VoiceTemplateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args VoiceTemplateArgs
- 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 voiceTemplateResource = new Descope.VoiceTemplate("voiceTemplateResource", new()
{
Body = "string",
Method = "string",
ProjectId = "string",
Name = "string",
});
example, err := descope.NewVoiceTemplate(ctx, "voiceTemplateResource", &descope.VoiceTemplateArgs{
Body: pulumi.String("string"),
Method: pulumi.String("string"),
ProjectId: pulumi.String("string"),
Name: pulumi.String("string"),
})
resource "descope_voice_template" "voiceTemplateResource" {
lifecycle {
create_before_destroy = true
}
body = "string"
method = "string"
project_id = "string"
name = "string"
}
var voiceTemplateResource = new VoiceTemplate("voiceTemplateResource", VoiceTemplateArgs.builder()
.body("string")
.method("string")
.projectId("string")
.name("string")
.build());
voice_template_resource = descope.VoiceTemplate("voiceTemplateResource",
body="string",
method="string",
project_id="string",
name="string")
const voiceTemplateResource = new descope.VoiceTemplate("voiceTemplateResource", {
body: "string",
method: "string",
projectId: "string",
name: "string",
});
type: descope:VoiceTemplate
properties:
body: string
method: string
name: string
projectId: string
VoiceTemplate 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 VoiceTemplate resource accepts the following input properties:
- Body string
- The text that's read aloud in voice calls made with this template. Template macros such as
{{.code}}can be used to insert dynamic values. - Method string
- The authentication method the voice template is used with. Currently only
otpis supported. Changing this value will require the resource to be deleted and recreated. - Project
Id string - The ID of the project that the voice template belongs to. Changing this value will require the resource to be deleted and recreated.
- Name string
- A name for the voice template that's unique among the templates of the same authentication method.
- Body string
- The text that's read aloud in voice calls made with this template. Template macros such as
{{.code}}can be used to insert dynamic values. - Method string
- The authentication method the voice template is used with. Currently only
otpis supported. Changing this value will require the resource to be deleted and recreated. - Project
Id string - The ID of the project that the voice template belongs to. Changing this value will require the resource to be deleted and recreated.
- Name string
- A name for the voice template that's unique among the templates of the same authentication method.
- body string
- The text that's read aloud in voice calls made with this template. Template macros such as
{{.code}}can be used to insert dynamic values. - method string
- The authentication method the voice template is used with. Currently only
otpis supported. Changing this value will require the resource to be deleted and recreated. - project_
id string - The ID of the project that the voice template belongs to. Changing this value will require the resource to be deleted and recreated.
- name string
- A name for the voice template that's unique among the templates of the same authentication method.
- body String
- The text that's read aloud in voice calls made with this template. Template macros such as
{{.code}}can be used to insert dynamic values. - method String
- The authentication method the voice template is used with. Currently only
otpis supported. Changing this value will require the resource to be deleted and recreated. - project
Id String - The ID of the project that the voice template belongs to. Changing this value will require the resource to be deleted and recreated.
- name String
- A name for the voice template that's unique among the templates of the same authentication method.
- body string
- The text that's read aloud in voice calls made with this template. Template macros such as
{{.code}}can be used to insert dynamic values. - method string
- The authentication method the voice template is used with. Currently only
otpis supported. Changing this value will require the resource to be deleted and recreated. - project
Id string - The ID of the project that the voice template belongs to. Changing this value will require the resource to be deleted and recreated.
- name string
- A name for the voice template that's unique among the templates of the same authentication method.
- body str
- The text that's read aloud in voice calls made with this template. Template macros such as
{{.code}}can be used to insert dynamic values. - method str
- The authentication method the voice template is used with. Currently only
otpis supported. Changing this value will require the resource to be deleted and recreated. - project_
id str - The ID of the project that the voice template belongs to. Changing this value will require the resource to be deleted and recreated.
- name str
- A name for the voice template that's unique among the templates of the same authentication method.
- body String
- The text that's read aloud in voice calls made with this template. Template macros such as
{{.code}}can be used to insert dynamic values. - method String
- The authentication method the voice template is used with. Currently only
otpis supported. Changing this value will require the resource to be deleted and recreated. - project
Id String - The ID of the project that the voice template belongs to. Changing this value will require the resource to be deleted and recreated.
- name String
- A name for the voice template that's unique among the templates of the same authentication method.
Outputs
All input properties are implicitly available as output properties. Additionally, the VoiceTemplate resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing VoiceTemplate Resource
Get an existing VoiceTemplate 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?: VoiceTemplateState, opts?: CustomResourceOptions): VoiceTemplate@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
body: Optional[str] = None,
method: Optional[str] = None,
name: Optional[str] = None,
project_id: Optional[str] = None) -> VoiceTemplatefunc GetVoiceTemplate(ctx *Context, name string, id IDInput, state *VoiceTemplateState, opts ...ResourceOption) (*VoiceTemplate, error)public static VoiceTemplate Get(string name, Input<string> id, VoiceTemplateState? state, CustomResourceOptions? opts = null)public static VoiceTemplate get(String name, Output<String> id, VoiceTemplateState state, CustomResourceOptions options)resources: existingVoiceTemplate: type: descope:VoiceTemplate get: id: ${id}import {
to = descope_voice_template.example
id = "${id}"
}
- name string
- The unique name of the resulting resource.
- id Input<ID>
- The unique provider ID of the resource to look up.
- state VoiceTemplateState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resulting resource.
- id str
- The unique provider ID of the resource to look up.
- 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 resulting resource.
- id IDInput
- The unique provider ID of the resource to look up.
- state VoiceTemplateState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resulting resource.
- id Input<string>
- The unique provider ID of the resource to look up.
- state VoiceTemplateState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resulting resource.
- id Output<String>
- The unique provider ID of the resource to look up.
- state VoiceTemplateState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
- Body string
- The text that's read aloud in voice calls made with this template. Template macros such as
{{.code}}can be used to insert dynamic values. - Method string
- The authentication method the voice template is used with. Currently only
otpis supported. Changing this value will require the resource to be deleted and recreated. - Name string
- A name for the voice template that's unique among the templates of the same authentication method.
- Project
Id string - The ID of the project that the voice template belongs to. Changing this value will require the resource to be deleted and recreated.
- Body string
- The text that's read aloud in voice calls made with this template. Template macros such as
{{.code}}can be used to insert dynamic values. - Method string
- The authentication method the voice template is used with. Currently only
otpis supported. Changing this value will require the resource to be deleted and recreated. - Name string
- A name for the voice template that's unique among the templates of the same authentication method.
- Project
Id string - The ID of the project that the voice template belongs to. Changing this value will require the resource to be deleted and recreated.
- body string
- The text that's read aloud in voice calls made with this template. Template macros such as
{{.code}}can be used to insert dynamic values. - method string
- The authentication method the voice template is used with. Currently only
otpis supported. Changing this value will require the resource to be deleted and recreated. - name string
- A name for the voice template that's unique among the templates of the same authentication method.
- project_
id string - The ID of the project that the voice template belongs to. Changing this value will require the resource to be deleted and recreated.
- body String
- The text that's read aloud in voice calls made with this template. Template macros such as
{{.code}}can be used to insert dynamic values. - method String
- The authentication method the voice template is used with. Currently only
otpis supported. Changing this value will require the resource to be deleted and recreated. - name String
- A name for the voice template that's unique among the templates of the same authentication method.
- project
Id String - The ID of the project that the voice template belongs to. Changing this value will require the resource to be deleted and recreated.
- body string
- The text that's read aloud in voice calls made with this template. Template macros such as
{{.code}}can be used to insert dynamic values. - method string
- The authentication method the voice template is used with. Currently only
otpis supported. Changing this value will require the resource to be deleted and recreated. - name string
- A name for the voice template that's unique among the templates of the same authentication method.
- project
Id string - The ID of the project that the voice template belongs to. Changing this value will require the resource to be deleted and recreated.
- body str
- The text that's read aloud in voice calls made with this template. Template macros such as
{{.code}}can be used to insert dynamic values. - method str
- The authentication method the voice template is used with. Currently only
otpis supported. Changing this value will require the resource to be deleted and recreated. - name str
- A name for the voice template that's unique among the templates of the same authentication method.
- project_
id str - The ID of the project that the voice template belongs to. Changing this value will require the resource to be deleted and recreated.
- body String
- The text that's read aloud in voice calls made with this template. Template macros such as
{{.code}}can be used to insert dynamic values. - method String
- The authentication method the voice template is used with. Currently only
otpis supported. Changing this value will require the resource to be deleted and recreated. - name String
- A name for the voice template that's unique among the templates of the same authentication method.
- project
Id String - The ID of the project that the voice template belongs to. Changing this value will require the resource to be deleted and recreated.
Package Details
- Repository
- descope descope/pulumi-descope
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
descopeTerraform Provider.
published on Sunday, Oct 11, 2026 by Descope