zia logo
Zscaler Internet Access v0.0.3, Jan 30 23

zia.DLP.DLPNotificationTemplates

The zia_dlp_notification_templates resource allows the creation and management of ZIA DLP Notification Templates in the Zscaler Internet Access cloud or via the API.

Example Usage

using System.Collections.Generic;
using System.IO;
using Pulumi;
using Zia = zscaler.PulumiPackage.Zia;

return await Deployment.RunAsync(() => 
{
    var example = new Zia.DLP.DLPNotificationTemplates("example", new()
    {
        Subject = $"DLP Violation: {TRANSACTION_ID} {ENGINES}",
        AttachContent = true,
        TlsEnabled = true,
        HtmlMessage = File.ReadAllText("./index.html"),
        PlainTextMessage = File.ReadAllText("./dlp.txt"),
    });

});
package main

import (
	"fmt"
	"io/ioutil"

	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/zscaler/pulumi-zia/sdk/go/zia/DLP"
)

func readFileOrPanic(path string) pulumi.StringPtrInput {
	data, err := ioutil.ReadFile(path)
	if err != nil {
		panic(err.Error())
	}
	return pulumi.String(string(data))
}

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := DLP.NewDLPNotificationTemplates(ctx, "example", &DLP.DLPNotificationTemplatesArgs{
			Subject:          pulumi.String(fmt.Sprintf("DLP Violation: %v %v", TRANSACTION_ID, ENGINES)),
			AttachContent:    pulumi.Bool(true),
			TlsEnabled:       pulumi.Bool(true),
			HtmlMessage:      readFileOrPanic("./index.html"),
			PlainTextMessage: readFileOrPanic("./dlp.txt"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.zia.DLP.DLPNotificationTemplates;
import com.pulumi.zia.DLP.DLPNotificationTemplatesArgs;
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) {
        var example = new DLPNotificationTemplates("example", DLPNotificationTemplatesArgs.builder()        
            .subject(String.format("DLP Violation: %s %s", TRANSACTION_ID,ENGINES))
            .attachContent(true)
            .tlsEnabled(true)
            .htmlMessage(Files.readString(Paths.get("./index.html")))
            .plainTextMessage(Files.readString(Paths.get("./dlp.txt")))
            .build());

    }
}
import pulumi
import zscaler_pulumi_zia as zia

example = zia.dlp.DLPNotificationTemplates("example",
    subject=f"DLP Violation: {transactio_n__id} {engines}",
    attach_content=True,
    tls_enabled=True,
    html_message=(lambda path: open(path).read())("./index.html"),
    plain_text_message=(lambda path: open(path).read())("./dlp.txt"))
import * as pulumi from "@pulumi/pulumi";
import * as fs from "fs";
import * as zia from "@zscaler/pulumi-zia";

const example = new zia.dlp.DLPNotificationTemplates("example", {
    subject: `DLP Violation: ${TRANSACTION_ID} ${ENGINES}`,
    attachContent: true,
    tlsEnabled: true,
    htmlMessage: fs.readFileSync("./index.html"),
    plainTextMessage: fs.readFileSync("./dlp.txt"),
});
resources:
  example:
    type: zia:DLP:DLPNotificationTemplates
    properties:
      subject: 'DLP Violation: ${TRANSACTION_ID} ${ENGINES}'
      attachContent: true
      tlsEnabled: true
      htmlMessage:
        fn::readFile: ./index.html
      plainTextMessage:
        fn::readFile: ./dlp.txt

Create DLPNotificationTemplates Resource

new DLPNotificationTemplates(name: string, args: DLPNotificationTemplatesArgs, opts?: CustomResourceOptions);
@overload
def DLPNotificationTemplates(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             attach_content: Optional[bool] = None,
                             html_message: Optional[str] = None,
                             name: Optional[str] = None,
                             plain_text_message: Optional[str] = None,
                             subject: Optional[str] = None,
                             tls_enabled: Optional[bool] = None)
@overload
def DLPNotificationTemplates(resource_name: str,
                             args: DLPNotificationTemplatesArgs,
                             opts: Optional[ResourceOptions] = None)
func NewDLPNotificationTemplates(ctx *Context, name string, args DLPNotificationTemplatesArgs, opts ...ResourceOption) (*DLPNotificationTemplates, error)
public DLPNotificationTemplates(string name, DLPNotificationTemplatesArgs args, CustomResourceOptions? opts = null)
public DLPNotificationTemplates(String name, DLPNotificationTemplatesArgs args)
public DLPNotificationTemplates(String name, DLPNotificationTemplatesArgs args, CustomResourceOptions options)
type: zia:DLP:DLPNotificationTemplates
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args DLPNotificationTemplatesArgs
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 DLPNotificationTemplatesArgs
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 DLPNotificationTemplatesArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DLPNotificationTemplatesArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args DLPNotificationTemplatesArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

DLPNotificationTemplates Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The DLPNotificationTemplates resource accepts the following input properties:

HtmlMessage string

The template for the HTML message body that must be displayed in the DLP notification email.

PlainTextMessage string

The template for the plain text UTF-8 message body that must be displayed in the DLP notification email.

AttachContent bool

If set to true, the content that is violation is attached to the DLP notification email.

Name string

The DLP policy rule name.

Subject string

The Subject line that is displayed within the DLP notification email.

TlsEnabled bool

If set to true, the content that is violation is attached to the DLP notification email.

HtmlMessage string

The template for the HTML message body that must be displayed in the DLP notification email.

PlainTextMessage string

The template for the plain text UTF-8 message body that must be displayed in the DLP notification email.

AttachContent bool

If set to true, the content that is violation is attached to the DLP notification email.

Name string

The DLP policy rule name.

Subject string

The Subject line that is displayed within the DLP notification email.

TlsEnabled bool

If set to true, the content that is violation is attached to the DLP notification email.

htmlMessage String

The template for the HTML message body that must be displayed in the DLP notification email.

plainTextMessage String

The template for the plain text UTF-8 message body that must be displayed in the DLP notification email.

attachContent Boolean

If set to true, the content that is violation is attached to the DLP notification email.

name String

The DLP policy rule name.

subject String

The Subject line that is displayed within the DLP notification email.

tlsEnabled Boolean

If set to true, the content that is violation is attached to the DLP notification email.

htmlMessage string

The template for the HTML message body that must be displayed in the DLP notification email.

plainTextMessage string

The template for the plain text UTF-8 message body that must be displayed in the DLP notification email.

attachContent boolean

If set to true, the content that is violation is attached to the DLP notification email.

name string

The DLP policy rule name.

subject string

The Subject line that is displayed within the DLP notification email.

tlsEnabled boolean

If set to true, the content that is violation is attached to the DLP notification email.

html_message str

The template for the HTML message body that must be displayed in the DLP notification email.

plain_text_message str

The template for the plain text UTF-8 message body that must be displayed in the DLP notification email.

attach_content bool

If set to true, the content that is violation is attached to the DLP notification email.

name str

The DLP policy rule name.

subject str

The Subject line that is displayed within the DLP notification email.

tls_enabled bool

If set to true, the content that is violation is attached to the DLP notification email.

htmlMessage String

The template for the HTML message body that must be displayed in the DLP notification email.

plainTextMessage String

The template for the plain text UTF-8 message body that must be displayed in the DLP notification email.

attachContent Boolean

If set to true, the content that is violation is attached to the DLP notification email.

name String

The DLP policy rule name.

subject String

The Subject line that is displayed within the DLP notification email.

tlsEnabled Boolean

If set to true, the content that is violation is attached to the DLP notification email.

Outputs

All input properties are implicitly available as output properties. Additionally, the DLPNotificationTemplates resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

TemplateId int
Id string

The provider-assigned unique ID for this managed resource.

TemplateId int
id String

The provider-assigned unique ID for this managed resource.

templateId Integer
id string

The provider-assigned unique ID for this managed resource.

templateId number
id str

The provider-assigned unique ID for this managed resource.

template_id int
id String

The provider-assigned unique ID for this managed resource.

templateId Number

Look up Existing DLPNotificationTemplates Resource

Get an existing DLPNotificationTemplates 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?: DLPNotificationTemplatesState, opts?: CustomResourceOptions): DLPNotificationTemplates
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        attach_content: Optional[bool] = None,
        html_message: Optional[str] = None,
        name: Optional[str] = None,
        plain_text_message: Optional[str] = None,
        subject: Optional[str] = None,
        template_id: Optional[int] = None,
        tls_enabled: Optional[bool] = None) -> DLPNotificationTemplates
func GetDLPNotificationTemplates(ctx *Context, name string, id IDInput, state *DLPNotificationTemplatesState, opts ...ResourceOption) (*DLPNotificationTemplates, error)
public static DLPNotificationTemplates Get(string name, Input<string> id, DLPNotificationTemplatesState? state, CustomResourceOptions? opts = null)
public static DLPNotificationTemplates get(String name, Output<String> id, DLPNotificationTemplatesState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
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.
The following state arguments are supported:
AttachContent bool

If set to true, the content that is violation is attached to the DLP notification email.

HtmlMessage string

The template for the HTML message body that must be displayed in the DLP notification email.

Name string

The DLP policy rule name.

PlainTextMessage string

The template for the plain text UTF-8 message body that must be displayed in the DLP notification email.

Subject string

The Subject line that is displayed within the DLP notification email.

TemplateId int
TlsEnabled bool

If set to true, the content that is violation is attached to the DLP notification email.

AttachContent bool

If set to true, the content that is violation is attached to the DLP notification email.

HtmlMessage string

The template for the HTML message body that must be displayed in the DLP notification email.

Name string

The DLP policy rule name.

PlainTextMessage string

The template for the plain text UTF-8 message body that must be displayed in the DLP notification email.

Subject string

The Subject line that is displayed within the DLP notification email.

TemplateId int
TlsEnabled bool

If set to true, the content that is violation is attached to the DLP notification email.

attachContent Boolean

If set to true, the content that is violation is attached to the DLP notification email.

htmlMessage String

The template for the HTML message body that must be displayed in the DLP notification email.

name String

The DLP policy rule name.

plainTextMessage String

The template for the plain text UTF-8 message body that must be displayed in the DLP notification email.

subject String

The Subject line that is displayed within the DLP notification email.

templateId Integer
tlsEnabled Boolean

If set to true, the content that is violation is attached to the DLP notification email.

attachContent boolean

If set to true, the content that is violation is attached to the DLP notification email.

htmlMessage string

The template for the HTML message body that must be displayed in the DLP notification email.

name string

The DLP policy rule name.

plainTextMessage string

The template for the plain text UTF-8 message body that must be displayed in the DLP notification email.

subject string

The Subject line that is displayed within the DLP notification email.

templateId number
tlsEnabled boolean

If set to true, the content that is violation is attached to the DLP notification email.

attach_content bool

If set to true, the content that is violation is attached to the DLP notification email.

html_message str

The template for the HTML message body that must be displayed in the DLP notification email.

name str

The DLP policy rule name.

plain_text_message str

The template for the plain text UTF-8 message body that must be displayed in the DLP notification email.

subject str

The Subject line that is displayed within the DLP notification email.

template_id int
tls_enabled bool

If set to true, the content that is violation is attached to the DLP notification email.

attachContent Boolean

If set to true, the content that is violation is attached to the DLP notification email.

htmlMessage String

The template for the HTML message body that must be displayed in the DLP notification email.

name String

The DLP policy rule name.

plainTextMessage String

The template for the plain text UTF-8 message body that must be displayed in the DLP notification email.

subject String

The Subject line that is displayed within the DLP notification email.

templateId Number
tlsEnabled Boolean

If set to true, the content that is violation is attached to the DLP notification email.

Package Details

Repository
zia zscaler/pulumi-zia
License
MIT
Notes

This Pulumi package is based on the zia Terraform Provider.