Data source to retrieve a specific Auth0 Phone Notification Template by template_id.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as auth0 from "@pulumi/auth0";
// Data Source Example: Retrieve Auth0 Phone Notification Templates
// This example shows how to fetch existing phone notification templates from your Auth0 tenant
// Retrieve the OTP enrollment template
const otpEnrollment = auth0.getBrandingPhoneNotificationTemplate({
templateId: "tem_xxxxxxxxxxxxxxxxx",
});
export const otpEnrollmentId = otpEnrollment.then(otpEnrollment => otpEnrollment.id);
import pulumi
import pulumi_auth0 as auth0
# Data Source Example: Retrieve Auth0 Phone Notification Templates
# This example shows how to fetch existing phone notification templates from your Auth0 tenant
# Retrieve the OTP enrollment template
otp_enrollment = auth0.get_branding_phone_notification_template(template_id="tem_xxxxxxxxxxxxxxxxx")
pulumi.export("otpEnrollmentId", otp_enrollment.id)
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 {
// Data Source Example: Retrieve Auth0 Phone Notification Templates
// This example shows how to fetch existing phone notification templates from your Auth0 tenant
// Retrieve the OTP enrollment template
otpEnrollment, err := auth0.LookupBrandingPhoneNotificationTemplate(ctx, &auth0.LookupBrandingPhoneNotificationTemplateArgs{
TemplateId: "tem_xxxxxxxxxxxxxxxxx",
}, nil)
if err != nil {
return err
}
ctx.Export("otpEnrollmentId", otpEnrollment.Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Auth0 = Pulumi.Auth0;
return await Deployment.RunAsync(() =>
{
// Data Source Example: Retrieve Auth0 Phone Notification Templates
// This example shows how to fetch existing phone notification templates from your Auth0 tenant
// Retrieve the OTP enrollment template
var otpEnrollment = Auth0.GetBrandingPhoneNotificationTemplate.Invoke(new()
{
TemplateId = "tem_xxxxxxxxxxxxxxxxx",
});
return new Dictionary<string, object?>
{
["otpEnrollmentId"] = otpEnrollment.Apply(getBrandingPhoneNotificationTemplateResult => getBrandingPhoneNotificationTemplateResult.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.auth0.Auth0Functions;
import com.pulumi.auth0.inputs.GetBrandingPhoneNotificationTemplateArgs;
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) {
// Data Source Example: Retrieve Auth0 Phone Notification Templates
// This example shows how to fetch existing phone notification templates from your Auth0 tenant
// Retrieve the OTP enrollment template
final var otpEnrollment = Auth0Functions.getBrandingPhoneNotificationTemplate(GetBrandingPhoneNotificationTemplateArgs.builder()
.templateId("tem_xxxxxxxxxxxxxxxxx")
.build());
ctx.export("otpEnrollmentId", otpEnrollment.id());
}
}
variables:
# Data Source Example: Retrieve Auth0 Phone Notification Templates
# This example shows how to fetch existing phone notification templates from your Auth0 tenant
# Retrieve the OTP enrollment template
otpEnrollment:
fn::invoke:
function: auth0:getBrandingPhoneNotificationTemplate
arguments:
templateId: tem_xxxxxxxxxxxxxxxxx
outputs:
# Output the template ID
otpEnrollmentId: ${otpEnrollment.id}
Using getBrandingPhoneNotificationTemplate
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getBrandingPhoneNotificationTemplate(args: GetBrandingPhoneNotificationTemplateArgs, opts?: InvokeOptions): Promise<GetBrandingPhoneNotificationTemplateResult>
function getBrandingPhoneNotificationTemplateOutput(args: GetBrandingPhoneNotificationTemplateOutputArgs, opts?: InvokeOptions): Output<GetBrandingPhoneNotificationTemplateResult>def get_branding_phone_notification_template(template_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetBrandingPhoneNotificationTemplateResult
def get_branding_phone_notification_template_output(template_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetBrandingPhoneNotificationTemplateResult]func LookupBrandingPhoneNotificationTemplate(ctx *Context, args *LookupBrandingPhoneNotificationTemplateArgs, opts ...InvokeOption) (*LookupBrandingPhoneNotificationTemplateResult, error)
func LookupBrandingPhoneNotificationTemplateOutput(ctx *Context, args *LookupBrandingPhoneNotificationTemplateOutputArgs, opts ...InvokeOption) LookupBrandingPhoneNotificationTemplateResultOutput> Note: This function is named LookupBrandingPhoneNotificationTemplate in the Go SDK.
public static class GetBrandingPhoneNotificationTemplate
{
public static Task<GetBrandingPhoneNotificationTemplateResult> InvokeAsync(GetBrandingPhoneNotificationTemplateArgs args, InvokeOptions? opts = null)
public static Output<GetBrandingPhoneNotificationTemplateResult> Invoke(GetBrandingPhoneNotificationTemplateInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetBrandingPhoneNotificationTemplateResult> getBrandingPhoneNotificationTemplate(GetBrandingPhoneNotificationTemplateArgs args, InvokeOptions options)
public static Output<GetBrandingPhoneNotificationTemplateResult> getBrandingPhoneNotificationTemplate(GetBrandingPhoneNotificationTemplateArgs args, InvokeOptions options)
fn::invoke:
function: auth0:index/getBrandingPhoneNotificationTemplate:getBrandingPhoneNotificationTemplate
arguments:
# arguments dictionaryThe following arguments are supported:
- Template
Id string - The ID of the Phone Notification Template.
- Template
Id string - The ID of the Phone Notification Template.
- template
Id String - The ID of the Phone Notification Template.
- template
Id string - The ID of the Phone Notification Template.
- template_
id str - The ID of the Phone Notification Template.
- template
Id String - The ID of the Phone Notification Template.
getBrandingPhoneNotificationTemplate Result
The following output properties are available:
- Channel string
- The channel of the phone notification template (e.g.,
sms,voice). - Contents
List<Get
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.
- 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.
- Type string
- The type of the phone notification template.
- Channel string
- The channel of the phone notification template (e.g.,
sms,voice). - Contents
[]Get
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.
- 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.
- Type string
- The type of the phone notification template.
- channel String
- The channel of the phone notification template (e.g.,
sms,voice). - contents
List<Get
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.
- 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.
- type String
- The type of the phone notification template.
- channel string
- The channel of the phone notification template (e.g.,
sms,voice). - contents
Get
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.
- 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.
- type string
- The type of the phone notification template.
- channel str
- The channel of the phone notification template (e.g.,
sms,voice). - contents
Sequence[Get
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.
- 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.
- type str
- The type of the phone notification template.
- channel String
- The channel of the phone notification template (e.g.,
sms,voice). - contents List<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.
- 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.
- type String
- The type of the phone notification template.
Supporting Types
GetBrandingPhoneNotificationTemplateContent
- Bodies
List<Get
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.
- Bodies
[]Get
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.
- bodies
List<Get
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.
- bodies
Get
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.
- bodies
Sequence[Get
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.
- bodies List<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.
GetBrandingPhoneNotificationTemplateContentBody
Package Details
- Repository
- Auth0 pulumi/pulumi-auth0
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
auth0Terraform Provider.
