1. Packages
  2. Cisco Meraki Provider
  3. API Docs
  4. networks
  5. WebhooksPayloadTemplates
Cisco Meraki v0.4.1 published on Saturday, Mar 15, 2025 by Pulumi

meraki.networks.WebhooksPayloadTemplates

Explore with Pulumi AI

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as meraki from "@pulumi/meraki";

const example = new meraki.networks.WebhooksPayloadTemplates("example", {
    body: "{'event_type':'{{alertTypeId}}','client_payload':{'text':'{{alertData}}'}}",
    bodyFile: "Qm9keSBGaWxl",
    headers: [{
        name: "Authorization",
        template: "Bearer {{sharedSecret}}",
    }],
    headersFile: "SGVhZGVycyBGaWxl",
    name: "Custom Template",
    networkId: "string",
});
export const merakiNetworksWebhooksPayloadTemplatesExample = example;
Copy
import pulumi
import pulumi_meraki as meraki

example = meraki.networks.WebhooksPayloadTemplates("example",
    body="{'event_type':'{{alertTypeId}}','client_payload':{'text':'{{alertData}}'}}",
    body_file="Qm9keSBGaWxl",
    headers=[{
        "name": "Authorization",
        "template": "Bearer {{sharedSecret}}",
    }],
    headers_file="SGVhZGVycyBGaWxl",
    name="Custom Template",
    network_id="string")
pulumi.export("merakiNetworksWebhooksPayloadTemplatesExample", example)
Copy
package main

import (
	"github.com/pulumi/pulumi-meraki/sdk/go/meraki/networks"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := networks.NewWebhooksPayloadTemplates(ctx, "example", &networks.WebhooksPayloadTemplatesArgs{
			Body:     pulumi.String("{'event_type':'{{alertTypeId}}','client_payload':{'text':'{{alertData}}'}}"),
			BodyFile: pulumi.String("Qm9keSBGaWxl"),
			Headers: networks.WebhooksPayloadTemplatesHeaderArray{
				&networks.WebhooksPayloadTemplatesHeaderArgs{
					Name:     pulumi.String("Authorization"),
					Template: pulumi.String("Bearer {{sharedSecret}}"),
				},
			},
			HeadersFile: pulumi.String("SGVhZGVycyBGaWxl"),
			Name:        pulumi.String("Custom Template"),
			NetworkId:   pulumi.String("string"),
		})
		if err != nil {
			return err
		}
		ctx.Export("merakiNetworksWebhooksPayloadTemplatesExample", example)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Meraki = Pulumi.Meraki;

return await Deployment.RunAsync(() => 
{
    var example = new Meraki.Networks.WebhooksPayloadTemplates("example", new()
    {
        Body = "{'event_type':'{{alertTypeId}}','client_payload':{'text':'{{alertData}}'}}",
        BodyFile = "Qm9keSBGaWxl",
        Headers = new[]
        {
            new Meraki.Networks.Inputs.WebhooksPayloadTemplatesHeaderArgs
            {
                Name = "Authorization",
                Template = "Bearer {{sharedSecret}}",
            },
        },
        HeadersFile = "SGVhZGVycyBGaWxl",
        Name = "Custom Template",
        NetworkId = "string",
    });

    return new Dictionary<string, object?>
    {
        ["merakiNetworksWebhooksPayloadTemplatesExample"] = example,
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.meraki.networks.WebhooksPayloadTemplates;
import com.pulumi.meraki.networks.WebhooksPayloadTemplatesArgs;
import com.pulumi.meraki.networks.inputs.WebhooksPayloadTemplatesHeaderArgs;
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 WebhooksPayloadTemplates("example", WebhooksPayloadTemplatesArgs.builder()
            .body("{'event_type':'{{alertTypeId}}','client_payload':{'text':'{{alertData}}'}}")
            .bodyFile("Qm9keSBGaWxl")
            .headers(WebhooksPayloadTemplatesHeaderArgs.builder()
                .name("Authorization")
                .template("Bearer {{sharedSecret}}")
                .build())
            .headersFile("SGVhZGVycyBGaWxl")
            .name("Custom Template")
            .networkId("string")
            .build());

        ctx.export("merakiNetworksWebhooksPayloadTemplatesExample", example);
    }
}
Copy
resources:
  example:
    type: meraki:networks:WebhooksPayloadTemplates
    properties:
      body: '{''event_type'':''{{alertTypeId}}'',''client_payload'':{''text'':''{{alertData}}''}}'
      bodyFile: Qm9keSBGaWxl
      headers:
        - name: Authorization
          template: Bearer {{sharedSecret}}
      headersFile: SGVhZGVycyBGaWxl
      name: Custom Template
      networkId: string
outputs:
  merakiNetworksWebhooksPayloadTemplatesExample: ${example}
Copy

Create WebhooksPayloadTemplates Resource

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

Constructor syntax

new WebhooksPayloadTemplates(name: string, args: WebhooksPayloadTemplatesArgs, opts?: CustomResourceOptions);
@overload
def WebhooksPayloadTemplates(resource_name: str,
                             args: WebhooksPayloadTemplatesArgs,
                             opts: Optional[ResourceOptions] = None)

@overload
def WebhooksPayloadTemplates(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             network_id: Optional[str] = None,
                             body: Optional[str] = None,
                             body_file: Optional[str] = None,
                             headers: Optional[Sequence[WebhooksPayloadTemplatesHeaderArgs]] = None,
                             headers_file: Optional[str] = None,
                             name: Optional[str] = None,
                             payload_template_id: Optional[str] = None)
func NewWebhooksPayloadTemplates(ctx *Context, name string, args WebhooksPayloadTemplatesArgs, opts ...ResourceOption) (*WebhooksPayloadTemplates, error)
public WebhooksPayloadTemplates(string name, WebhooksPayloadTemplatesArgs args, CustomResourceOptions? opts = null)
public WebhooksPayloadTemplates(String name, WebhooksPayloadTemplatesArgs args)
public WebhooksPayloadTemplates(String name, WebhooksPayloadTemplatesArgs args, CustomResourceOptions options)
type: meraki:networks:WebhooksPayloadTemplates
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. WebhooksPayloadTemplatesArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. WebhooksPayloadTemplatesArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. WebhooksPayloadTemplatesArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. WebhooksPayloadTemplatesArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. WebhooksPayloadTemplatesArgs
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 webhooksPayloadTemplatesResource = new Meraki.Networks.WebhooksPayloadTemplates("webhooksPayloadTemplatesResource", new()
{
    NetworkId = "string",
    Body = "string",
    BodyFile = "string",
    Headers = new[]
    {
        new Meraki.Networks.Inputs.WebhooksPayloadTemplatesHeaderArgs
        {
            Name = "string",
            Template = "string",
        },
    },
    HeadersFile = "string",
    Name = "string",
    PayloadTemplateId = "string",
});
Copy
example, err := networks.NewWebhooksPayloadTemplates(ctx, "webhooksPayloadTemplatesResource", &networks.WebhooksPayloadTemplatesArgs{
	NetworkId: pulumi.String("string"),
	Body:      pulumi.String("string"),
	BodyFile:  pulumi.String("string"),
	Headers: networks.WebhooksPayloadTemplatesHeaderArray{
		&networks.WebhooksPayloadTemplatesHeaderArgs{
			Name:     pulumi.String("string"),
			Template: pulumi.String("string"),
		},
	},
	HeadersFile:       pulumi.String("string"),
	Name:              pulumi.String("string"),
	PayloadTemplateId: pulumi.String("string"),
})
Copy
var webhooksPayloadTemplatesResource = new WebhooksPayloadTemplates("webhooksPayloadTemplatesResource", WebhooksPayloadTemplatesArgs.builder()
    .networkId("string")
    .body("string")
    .bodyFile("string")
    .headers(WebhooksPayloadTemplatesHeaderArgs.builder()
        .name("string")
        .template("string")
        .build())
    .headersFile("string")
    .name("string")
    .payloadTemplateId("string")
    .build());
Copy
webhooks_payload_templates_resource = meraki.networks.WebhooksPayloadTemplates("webhooksPayloadTemplatesResource",
    network_id="string",
    body="string",
    body_file="string",
    headers=[{
        "name": "string",
        "template": "string",
    }],
    headers_file="string",
    name="string",
    payload_template_id="string")
Copy
const webhooksPayloadTemplatesResource = new meraki.networks.WebhooksPayloadTemplates("webhooksPayloadTemplatesResource", {
    networkId: "string",
    body: "string",
    bodyFile: "string",
    headers: [{
        name: "string",
        template: "string",
    }],
    headersFile: "string",
    name: "string",
    payloadTemplateId: "string",
});
Copy
type: meraki:networks:WebhooksPayloadTemplates
properties:
    body: string
    bodyFile: string
    headers:
        - name: string
          template: string
    headersFile: string
    name: string
    networkId: string
    payloadTemplateId: string
Copy

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

NetworkId This property is required. string
networkId path parameter. Network ID
Body string
The body of the payload template, in liquid template
BodyFile string
A file containing liquid template used for the body of the webhook message. Either body or bodyFile must be specified.
Headers List<WebhooksPayloadTemplatesHeader>
The payload template headers, will be rendered as a key-value pair in the webhook.
HeadersFile string
A file containing the liquid template used with the webhook headers.
Name string
The name of the payload template
PayloadTemplateId string
Webhook payload template Id
NetworkId This property is required. string
networkId path parameter. Network ID
Body string
The body of the payload template, in liquid template
BodyFile string
A file containing liquid template used for the body of the webhook message. Either body or bodyFile must be specified.
Headers []WebhooksPayloadTemplatesHeaderArgs
The payload template headers, will be rendered as a key-value pair in the webhook.
HeadersFile string
A file containing the liquid template used with the webhook headers.
Name string
The name of the payload template
PayloadTemplateId string
Webhook payload template Id
networkId This property is required. String
networkId path parameter. Network ID
body String
The body of the payload template, in liquid template
bodyFile String
A file containing liquid template used for the body of the webhook message. Either body or bodyFile must be specified.
headers List<WebhooksPayloadTemplatesHeader>
The payload template headers, will be rendered as a key-value pair in the webhook.
headersFile String
A file containing the liquid template used with the webhook headers.
name String
The name of the payload template
payloadTemplateId String
Webhook payload template Id
networkId This property is required. string
networkId path parameter. Network ID
body string
The body of the payload template, in liquid template
bodyFile string
A file containing liquid template used for the body of the webhook message. Either body or bodyFile must be specified.
headers WebhooksPayloadTemplatesHeader[]
The payload template headers, will be rendered as a key-value pair in the webhook.
headersFile string
A file containing the liquid template used with the webhook headers.
name string
The name of the payload template
payloadTemplateId string
Webhook payload template Id
network_id This property is required. str
networkId path parameter. Network ID
body str
The body of the payload template, in liquid template
body_file str
A file containing liquid template used for the body of the webhook message. Either body or bodyFile must be specified.
headers Sequence[WebhooksPayloadTemplatesHeaderArgs]
The payload template headers, will be rendered as a key-value pair in the webhook.
headers_file str
A file containing the liquid template used with the webhook headers.
name str
The name of the payload template
payload_template_id str
Webhook payload template Id
networkId This property is required. String
networkId path parameter. Network ID
body String
The body of the payload template, in liquid template
bodyFile String
A file containing liquid template used for the body of the webhook message. Either body or bodyFile must be specified.
headers List<Property Map>
The payload template headers, will be rendered as a key-value pair in the webhook.
headersFile String
A file containing the liquid template used with the webhook headers.
name String
The name of the payload template
payloadTemplateId String
Webhook payload template Id

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Sharing WebhooksPayloadTemplatesSharing
Information on which entities have access to the template
Type string
The type of the payload template
Id string
The provider-assigned unique ID for this managed resource.
Sharing WebhooksPayloadTemplatesSharing
Information on which entities have access to the template
Type string
The type of the payload template
id String
The provider-assigned unique ID for this managed resource.
sharing WebhooksPayloadTemplatesSharing
Information on which entities have access to the template
type String
The type of the payload template
id string
The provider-assigned unique ID for this managed resource.
sharing WebhooksPayloadTemplatesSharing
Information on which entities have access to the template
type string
The type of the payload template
id str
The provider-assigned unique ID for this managed resource.
sharing WebhooksPayloadTemplatesSharing
Information on which entities have access to the template
type str
The type of the payload template
id String
The provider-assigned unique ID for this managed resource.
sharing Property Map
Information on which entities have access to the template
type String
The type of the payload template

Look up Existing WebhooksPayloadTemplates Resource

Get an existing WebhooksPayloadTemplates 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?: WebhooksPayloadTemplatesState, opts?: CustomResourceOptions): WebhooksPayloadTemplates
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        body: Optional[str] = None,
        body_file: Optional[str] = None,
        headers: Optional[Sequence[WebhooksPayloadTemplatesHeaderArgs]] = None,
        headers_file: Optional[str] = None,
        name: Optional[str] = None,
        network_id: Optional[str] = None,
        payload_template_id: Optional[str] = None,
        sharing: Optional[WebhooksPayloadTemplatesSharingArgs] = None,
        type: Optional[str] = None) -> WebhooksPayloadTemplates
func GetWebhooksPayloadTemplates(ctx *Context, name string, id IDInput, state *WebhooksPayloadTemplatesState, opts ...ResourceOption) (*WebhooksPayloadTemplates, error)
public static WebhooksPayloadTemplates Get(string name, Input<string> id, WebhooksPayloadTemplatesState? state, CustomResourceOptions? opts = null)
public static WebhooksPayloadTemplates get(String name, Output<String> id, WebhooksPayloadTemplatesState state, CustomResourceOptions options)
resources:  _:    type: meraki:networks:WebhooksPayloadTemplates    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Body string
The body of the payload template, in liquid template
BodyFile string
A file containing liquid template used for the body of the webhook message. Either body or bodyFile must be specified.
Headers List<WebhooksPayloadTemplatesHeader>
The payload template headers, will be rendered as a key-value pair in the webhook.
HeadersFile string
A file containing the liquid template used with the webhook headers.
Name string
The name of the payload template
NetworkId string
networkId path parameter. Network ID
PayloadTemplateId string
Webhook payload template Id
Sharing WebhooksPayloadTemplatesSharing
Information on which entities have access to the template
Type string
The type of the payload template
Body string
The body of the payload template, in liquid template
BodyFile string
A file containing liquid template used for the body of the webhook message. Either body or bodyFile must be specified.
Headers []WebhooksPayloadTemplatesHeaderArgs
The payload template headers, will be rendered as a key-value pair in the webhook.
HeadersFile string
A file containing the liquid template used with the webhook headers.
Name string
The name of the payload template
NetworkId string
networkId path parameter. Network ID
PayloadTemplateId string
Webhook payload template Id
Sharing WebhooksPayloadTemplatesSharingArgs
Information on which entities have access to the template
Type string
The type of the payload template
body String
The body of the payload template, in liquid template
bodyFile String
A file containing liquid template used for the body of the webhook message. Either body or bodyFile must be specified.
headers List<WebhooksPayloadTemplatesHeader>
The payload template headers, will be rendered as a key-value pair in the webhook.
headersFile String
A file containing the liquid template used with the webhook headers.
name String
The name of the payload template
networkId String
networkId path parameter. Network ID
payloadTemplateId String
Webhook payload template Id
sharing WebhooksPayloadTemplatesSharing
Information on which entities have access to the template
type String
The type of the payload template
body string
The body of the payload template, in liquid template
bodyFile string
A file containing liquid template used for the body of the webhook message. Either body or bodyFile must be specified.
headers WebhooksPayloadTemplatesHeader[]
The payload template headers, will be rendered as a key-value pair in the webhook.
headersFile string
A file containing the liquid template used with the webhook headers.
name string
The name of the payload template
networkId string
networkId path parameter. Network ID
payloadTemplateId string
Webhook payload template Id
sharing WebhooksPayloadTemplatesSharing
Information on which entities have access to the template
type string
The type of the payload template
body str
The body of the payload template, in liquid template
body_file str
A file containing liquid template used for the body of the webhook message. Either body or bodyFile must be specified.
headers Sequence[WebhooksPayloadTemplatesHeaderArgs]
The payload template headers, will be rendered as a key-value pair in the webhook.
headers_file str
A file containing the liquid template used with the webhook headers.
name str
The name of the payload template
network_id str
networkId path parameter. Network ID
payload_template_id str
Webhook payload template Id
sharing WebhooksPayloadTemplatesSharingArgs
Information on which entities have access to the template
type str
The type of the payload template
body String
The body of the payload template, in liquid template
bodyFile String
A file containing liquid template used for the body of the webhook message. Either body or bodyFile must be specified.
headers List<Property Map>
The payload template headers, will be rendered as a key-value pair in the webhook.
headersFile String
A file containing the liquid template used with the webhook headers.
name String
The name of the payload template
networkId String
networkId path parameter. Network ID
payloadTemplateId String
Webhook payload template Id
sharing Property Map
Information on which entities have access to the template
type String
The type of the payload template

Supporting Types

WebhooksPayloadTemplatesHeader
, WebhooksPayloadTemplatesHeaderArgs

Name string
The name of the header attribute
Template string
The value returned in the header attribute, in liquid template
Name string
The name of the header attribute
Template string
The value returned in the header attribute, in liquid template
name String
The name of the header attribute
template String
The value returned in the header attribute, in liquid template
name string
The name of the header attribute
template string
The value returned in the header attribute, in liquid template
name str
The name of the header attribute
template str
The value returned in the header attribute, in liquid template
name String
The name of the header attribute
template String
The value returned in the header attribute, in liquid template

WebhooksPayloadTemplatesSharing
, WebhooksPayloadTemplatesSharingArgs

ByNetwork WebhooksPayloadTemplatesSharingByNetwork
Information on network access to the template
ByNetwork WebhooksPayloadTemplatesSharingByNetwork
Information on network access to the template
byNetwork WebhooksPayloadTemplatesSharingByNetwork
Information on network access to the template
byNetwork WebhooksPayloadTemplatesSharingByNetwork
Information on network access to the template
by_network WebhooksPayloadTemplatesSharingByNetwork
Information on network access to the template
byNetwork Property Map
Information on network access to the template

WebhooksPayloadTemplatesSharingByNetwork
, WebhooksPayloadTemplatesSharingByNetworkArgs

AdminsCanModify bool
Indicates whether network admins may modify this template
AdminsCanModify bool
Indicates whether network admins may modify this template
adminsCanModify Boolean
Indicates whether network admins may modify this template
adminsCanModify boolean
Indicates whether network admins may modify this template
admins_can_modify bool
Indicates whether network admins may modify this template
adminsCanModify Boolean
Indicates whether network admins may modify this template

Import

$ pulumi import meraki:networks/webhooksPayloadTemplates:WebhooksPayloadTemplates example "network_id,payload_template_id"
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
meraki pulumi/pulumi-meraki
License
Apache-2.0
Notes
This Pulumi package is based on the meraki Terraform Provider.