1. Packages
  2. Impart Security
  3. API Docs
  4. NotificationTemplate
Impart Security v0.8.0 published on Monday, Nov 11, 2024 by Impart Security

impart.NotificationTemplate

Explore with Pulumi AI

impart logo
Impart Security v0.8.0 published on Monday, Nov 11, 2024 by Impart Security

    Manage an notification template.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as impart from "@impart-security/pulumi-impart";
    
    // Create a new notification template
    const example = new impart.NotificationTemplate("example", {
        connectorId: "<example_connector.id>",
        destinations: ["test-destination-id"],
        name: "notification_template_example",
        payload: "This is a test message payload",
        subject: "Test subject",
    });
    
    import pulumi
    import pulumi_impart as impart
    
    # Create a new notification template
    example = impart.NotificationTemplate("example",
        connector_id="<example_connector.id>",
        destinations=["test-destination-id"],
        name="notification_template_example",
        payload="This is a test message payload",
        subject="Test subject")
    
    package main
    
    import (
    	"github.com/impart-security/pulumi-impart/sdk/go/impart"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Create a new notification template
    		_, err := impart.NewNotificationTemplate(ctx, "example", &impart.NotificationTemplateArgs{
    			ConnectorId: pulumi.String("<example_connector.id>"),
    			Destinations: pulumi.StringArray{
    				pulumi.String("test-destination-id"),
    			},
    			Name:    pulumi.String("notification_template_example"),
    			Payload: pulumi.String("This is a test message payload"),
    			Subject: pulumi.String("Test subject"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Impart = Pulumi.Impart;
    
    return await Deployment.RunAsync(() => 
    {
        // Create a new notification template
        var example = new Impart.NotificationTemplate("example", new()
        {
            ConnectorId = "<example_connector.id>",
            Destinations = new[]
            {
                "test-destination-id",
            },
            Name = "notification_template_example",
            Payload = "This is a test message payload",
            Subject = "Test subject",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.impart.NotificationTemplate;
    import com.pulumi.impart.NotificationTemplateArgs;
    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) {
            // Create a new notification template
            var example = new NotificationTemplate("example", NotificationTemplateArgs.builder()
                .connectorId("<example_connector.id>")
                .destinations("test-destination-id")
                .name("notification_template_example")
                .payload("This is a test message payload")
                .subject("Test subject")
                .build());
    
        }
    }
    
    resources:
      # Create a new notification template
      example:
        type: impart:NotificationTemplate
        properties:
          connectorId: <example_connector.id>
          destinations:
            - test-destination-id
          name: notification_template_example
          payload: This is a test message payload
          subject: Test subject
    

    Create NotificationTemplate Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new NotificationTemplate(name: string, args: NotificationTemplateArgs, opts?: CustomResourceOptions);
    @overload
    def NotificationTemplate(resource_name: str,
                             args: NotificationTemplateArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def NotificationTemplate(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             connector_id: Optional[str] = None,
                             destinations: Optional[Sequence[str]] = None,
                             name: Optional[str] = None,
                             payload: Optional[str] = None,
                             subject: Optional[str] = None)
    func NewNotificationTemplate(ctx *Context, name string, args NotificationTemplateArgs, opts ...ResourceOption) (*NotificationTemplate, error)
    public NotificationTemplate(string name, NotificationTemplateArgs args, CustomResourceOptions? opts = null)
    public NotificationTemplate(String name, NotificationTemplateArgs args)
    public NotificationTemplate(String name, NotificationTemplateArgs args, CustomResourceOptions options)
    
    type: impart:NotificationTemplate
    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 NotificationTemplateArgs
    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 NotificationTemplateArgs
    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 NotificationTemplateArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NotificationTemplateArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NotificationTemplateArgs
    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 notificationTemplateResource = new Impart.NotificationTemplate("notificationTemplateResource", new()
    {
        ConnectorId = "string",
        Destinations = new[]
        {
            "string",
        },
        Name = "string",
        Payload = "string",
        Subject = "string",
    });
    
    example, err := impart.NewNotificationTemplate(ctx, "notificationTemplateResource", &impart.NotificationTemplateArgs{
    	ConnectorId: pulumi.String("string"),
    	Destinations: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Name:    pulumi.String("string"),
    	Payload: pulumi.String("string"),
    	Subject: pulumi.String("string"),
    })
    
    var notificationTemplateResource = new NotificationTemplate("notificationTemplateResource", NotificationTemplateArgs.builder()
        .connectorId("string")
        .destinations("string")
        .name("string")
        .payload("string")
        .subject("string")
        .build());
    
    notification_template_resource = impart.NotificationTemplate("notificationTemplateResource",
        connector_id="string",
        destinations=["string"],
        name="string",
        payload="string",
        subject="string")
    
    const notificationTemplateResource = new impart.NotificationTemplate("notificationTemplateResource", {
        connectorId: "string",
        destinations: ["string"],
        name: "string",
        payload: "string",
        subject: "string",
    });
    
    type: impart:NotificationTemplate
    properties:
        connectorId: string
        destinations:
            - string
        name: string
        payload: string
        subject: string
    

    NotificationTemplate 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 NotificationTemplate resource accepts the following input properties:

    ConnectorId string
    The connector id.
    Destinations List<string>
    An array of destination ids to which the payloads will be sent.
    Name string
    The name for this notification template.
    Payload string
    The payload message that will be sent to the Third Party API.
    Subject string
    The subject message that will be sent to the Third Party API.
    ConnectorId string
    The connector id.
    Destinations []string
    An array of destination ids to which the payloads will be sent.
    Name string
    The name for this notification template.
    Payload string
    The payload message that will be sent to the Third Party API.
    Subject string
    The subject message that will be sent to the Third Party API.
    connectorId String
    The connector id.
    destinations List<String>
    An array of destination ids to which the payloads will be sent.
    name String
    The name for this notification template.
    payload String
    The payload message that will be sent to the Third Party API.
    subject String
    The subject message that will be sent to the Third Party API.
    connectorId string
    The connector id.
    destinations string[]
    An array of destination ids to which the payloads will be sent.
    name string
    The name for this notification template.
    payload string
    The payload message that will be sent to the Third Party API.
    subject string
    The subject message that will be sent to the Third Party API.
    connector_id str
    The connector id.
    destinations Sequence[str]
    An array of destination ids to which the payloads will be sent.
    name str
    The name for this notification template.
    payload str
    The payload message that will be sent to the Third Party API.
    subject str
    The subject message that will be sent to the Third Party API.
    connectorId String
    The connector id.
    destinations List<String>
    An array of destination ids to which the payloads will be sent.
    name String
    The name for this notification template.
    payload String
    The payload message that will be sent to the Third Party API.
    subject String
    The subject message that will be sent to the Third Party API.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the NotificationTemplate 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 str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing NotificationTemplate Resource

    Get an existing NotificationTemplate 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?: NotificationTemplateState, opts?: CustomResourceOptions): NotificationTemplate
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            connector_id: Optional[str] = None,
            destinations: Optional[Sequence[str]] = None,
            name: Optional[str] = None,
            payload: Optional[str] = None,
            subject: Optional[str] = None) -> NotificationTemplate
    func GetNotificationTemplate(ctx *Context, name string, id IDInput, state *NotificationTemplateState, opts ...ResourceOption) (*NotificationTemplate, error)
    public static NotificationTemplate Get(string name, Input<string> id, NotificationTemplateState? state, CustomResourceOptions? opts = null)
    public static NotificationTemplate get(String name, Output<String> id, NotificationTemplateState 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:
    ConnectorId string
    The connector id.
    Destinations List<string>
    An array of destination ids to which the payloads will be sent.
    Name string
    The name for this notification template.
    Payload string
    The payload message that will be sent to the Third Party API.
    Subject string
    The subject message that will be sent to the Third Party API.
    ConnectorId string
    The connector id.
    Destinations []string
    An array of destination ids to which the payloads will be sent.
    Name string
    The name for this notification template.
    Payload string
    The payload message that will be sent to the Third Party API.
    Subject string
    The subject message that will be sent to the Third Party API.
    connectorId String
    The connector id.
    destinations List<String>
    An array of destination ids to which the payloads will be sent.
    name String
    The name for this notification template.
    payload String
    The payload message that will be sent to the Third Party API.
    subject String
    The subject message that will be sent to the Third Party API.
    connectorId string
    The connector id.
    destinations string[]
    An array of destination ids to which the payloads will be sent.
    name string
    The name for this notification template.
    payload string
    The payload message that will be sent to the Third Party API.
    subject string
    The subject message that will be sent to the Third Party API.
    connector_id str
    The connector id.
    destinations Sequence[str]
    An array of destination ids to which the payloads will be sent.
    name str
    The name for this notification template.
    payload str
    The payload message that will be sent to the Third Party API.
    subject str
    The subject message that will be sent to the Third Party API.
    connectorId String
    The connector id.
    destinations List<String>
    An array of destination ids to which the payloads will be sent.
    name String
    The name for this notification template.
    payload String
    The payload message that will be sent to the Third Party API.
    subject String
    The subject message that will be sent to the Third Party API.

    Package Details

    Repository
    impart impart-security/pulumi-impart
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the impart Terraform Provider.
    impart logo
    Impart Security v0.8.0 published on Monday, Nov 11, 2024 by Impart Security