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;
import pulumi
import pulumi_meraki as meraki
example = meraki.networks.WebhooksPayloadTemplates("example",
body="{'event_type':'{{alertTypeId}}','client_payload':{'text':'{{alertData}}'}}",
body_file="Qm9keSBGaWxl",
headers=[meraki.networks.WebhooksPayloadTemplatesHeaderArgs(
name="Authorization",
template="Bearer {{sharedSecret}}",
)],
headers_file="SGVhZGVycyBGaWxl",
name="Custom Template",
network_id="string")
pulumi.export("merakiNetworksWebhooksPayloadTemplatesExample", example)
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
})
}
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,
};
});
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);
}
}
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}
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 string
- The unique name of the resource.
- args WebhooksPayloadTemplatesArgs
- 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 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 string
- The unique name of the resource.
- args WebhooksPayloadTemplatesArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WebhooksPayloadTemplatesArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
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"),
})
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());
webhooks_payload_templates_resource = meraki.networks.WebhooksPayloadTemplates("webhooksPayloadTemplatesResource",
network_id="string",
body="string",
body_file="string",
headers=[meraki.networks.WebhooksPayloadTemplatesHeaderArgs(
name="string",
template="string",
)],
headers_file="string",
name="string",
payload_template_id="string")
const webhooksPayloadTemplatesResource = new meraki.networks.WebhooksPayloadTemplates("webhooksPayloadTemplatesResource", {
networkId: "string",
body: "string",
bodyFile: "string",
headers: [{
name: "string",
template: "string",
}],
headersFile: "string",
name: "string",
payloadTemplateId: "string",
});
type: meraki:networks:WebhooksPayloadTemplates
properties:
body: string
bodyFile: string
headers:
- name: string
template: string
headersFile: string
name: string
networkId: string
payloadTemplateId: string
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
The WebhooksPayloadTemplates resource accepts the following input properties:
- Network
Id string - networkId path parameter. Network ID
- Body string
- The body of the payload template, in liquid template
- Body
File string - A file containing liquid template used for the body of the webhook message. Either body or bodyFile must be specified.
- Headers
List<Webhooks
Payload Templates Header> - The payload template headers, will be rendered as a key-value pair in the webhook.
- Headers
File string - A file containing the liquid template used with the webhook headers.
- Name string
- The name of the payload template
- Payload
Template stringId - Webhook payload template Id
- Network
Id string - networkId path parameter. Network ID
- Body string
- The body of the payload template, in liquid template
- Body
File string - A file containing liquid template used for the body of the webhook message. Either body or bodyFile must be specified.
- Headers
[]Webhooks
Payload Templates Header Args - The payload template headers, will be rendered as a key-value pair in the webhook.
- Headers
File string - A file containing the liquid template used with the webhook headers.
- Name string
- The name of the payload template
- Payload
Template stringId - Webhook payload template Id
- network
Id String - networkId path parameter. Network ID
- body String
- The body of the payload template, in liquid template
- body
File String - A file containing liquid template used for the body of the webhook message. Either body or bodyFile must be specified.
- headers
List<Webhooks
Payload Templates Header> - The payload template headers, will be rendered as a key-value pair in the webhook.
- headers
File String - A file containing the liquid template used with the webhook headers.
- name String
- The name of the payload template
- payload
Template StringId - Webhook payload template Id
- network
Id string - networkId path parameter. Network ID
- body string
- The body of the payload template, in liquid template
- body
File string - A file containing liquid template used for the body of the webhook message. Either body or bodyFile must be specified.
- headers
Webhooks
Payload Templates Header[] - The payload template headers, will be rendered as a key-value pair in the webhook.
- headers
File string - A file containing the liquid template used with the webhook headers.
- name string
- The name of the payload template
- payload
Template stringId - Webhook payload template Id
- network_
id 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[Webhooks
Payload Templates Header Args] - 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_ strid - Webhook payload template Id
- network
Id String - networkId path parameter. Network ID
- body String
- The body of the payload template, in liquid template
- body
File 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.
- headers
File String - A file containing the liquid template used with the webhook headers.
- name String
- The name of the payload template
- payload
Template StringId - 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.
- Webhooks
Payload Templates Sharing - 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.
- Webhooks
Payload Templates Sharing - 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.
- Webhooks
Payload Templates Sharing - 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.
- Webhooks
Payload Templates Sharing - 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.
- Webhooks
Payload Templates Sharing - 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.
- 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)
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.
- Body string
- The body of the payload template, in liquid template
- Body
File string - A file containing liquid template used for the body of the webhook message. Either body or bodyFile must be specified.
- Headers
List<Webhooks
Payload Templates Header> - The payload template headers, will be rendered as a key-value pair in the webhook.
- Headers
File string - A file containing the liquid template used with the webhook headers.
- Name string
- The name of the payload template
- Network
Id string - networkId path parameter. Network ID
- Payload
Template stringId - Webhook payload template Id
- Sharing
Webhooks
Payload Templates Sharing - 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
- Body
File string - A file containing liquid template used for the body of the webhook message. Either body or bodyFile must be specified.
- Headers
[]Webhooks
Payload Templates Header Args - The payload template headers, will be rendered as a key-value pair in the webhook.
- Headers
File string - A file containing the liquid template used with the webhook headers.
- Name string
- The name of the payload template
- Network
Id string - networkId path parameter. Network ID
- Payload
Template stringId - Webhook payload template Id
- Sharing
Webhooks
Payload Templates Sharing Args - 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
- body
File String - A file containing liquid template used for the body of the webhook message. Either body or bodyFile must be specified.
- headers
List<Webhooks
Payload Templates Header> - The payload template headers, will be rendered as a key-value pair in the webhook.
- headers
File String - A file containing the liquid template used with the webhook headers.
- name String
- The name of the payload template
- network
Id String - networkId path parameter. Network ID
- payload
Template StringId - Webhook payload template Id
- sharing
Webhooks
Payload Templates Sharing - 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
- body
File string - A file containing liquid template used for the body of the webhook message. Either body or bodyFile must be specified.
- headers
Webhooks
Payload Templates Header[] - The payload template headers, will be rendered as a key-value pair in the webhook.
- headers
File string - A file containing the liquid template used with the webhook headers.
- name string
- The name of the payload template
- network
Id string - networkId path parameter. Network ID
- payload
Template stringId - Webhook payload template Id
- sharing
Webhooks
Payload Templates Sharing - 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[Webhooks
Payload Templates Header Args] - 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_ strid - Webhook payload template Id
- sharing
Webhooks
Payload Templates Sharing Args - 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
- body
File 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.
- headers
File String - A file containing the liquid template used with the webhook headers.
- name String
- The name of the payload template
- network
Id String - networkId path parameter. Network ID
- payload
Template StringId - 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
WebhooksPayloadTemplatesSharing, WebhooksPayloadTemplatesSharingArgs
- By
Network WebhooksPayload Templates Sharing By Network - Information on network access to the template
- By
Network WebhooksPayload Templates Sharing By Network - Information on network access to the template
- by
Network WebhooksPayload Templates Sharing By Network - Information on network access to the template
- by
Network WebhooksPayload Templates Sharing By Network - Information on network access to the template
- by_
network WebhooksPayload Templates Sharing By Network - Information on network access to the template
- by
Network Property Map - Information on network access to the template
WebhooksPayloadTemplatesSharingByNetwork, WebhooksPayloadTemplatesSharingByNetworkArgs
- Admins
Can boolModify - Indicates whether network admins may modify this template
- Admins
Can boolModify - Indicates whether network admins may modify this template
- admins
Can BooleanModify - Indicates whether network admins may modify this template
- admins
Can booleanModify - Indicates whether network admins may modify this template
- admins_
can_ boolmodify - Indicates whether network admins may modify this template
- admins
Can BooleanModify - Indicates whether network admins may modify this template
Import
$ pulumi import meraki:networks/webhooksPayloadTemplates:WebhooksPayloadTemplates example "network_id,payload_template_id"
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.