junipermist.org.Alarmtemplate
Explore with Pulumi AI
This resource manages Alarm Templates. An Alarm Template is a set of Alarm Rules that could be applied to one or more sites (while each site can only pick one Alarm Template), or to the whole org.
Once created, the Alarm template must be assigned with the alarmtemplate_id
attribute to one of the following
* the whole org with the junipermist.org.base
resource
* one or multiple sites with the junipermist.site.base
resource
It is possible to use the junipermist.getConstAlarms
data source to get a list of the available alarms
Example Usage
Coming soon!
Coming soon!
Coming soon!
Coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.junipermist.org.Alarmtemplate;
import com.pulumi.junipermist.org.AlarmtemplateArgs;
import com.pulumi.junipermist.org.inputs.AlarmtemplateDeliveryArgs;
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 alarmtemplateOne = new Alarmtemplate("alarmtemplateOne", AlarmtemplateArgs.builder()
.orgId(terraformTest.id())
.name("alarmtemplate_one")
.delivery(AlarmtemplateDeliveryArgs.builder()
.enabled(true)
.to_org_admins(true)
.additional_emails("admin@mycorp.net")
.build())
.rules(Map.ofEntries(
Map.entry("health_check_failed", Map.of("enabled", true)),
Map.entry("insufficient_capacity", Map.of("enabled", true)),
Map.entry("insufficient_coverage", Map.of("enabled", true)),
Map.entry("infra_arp_failure", Map.of("enabled", true)),
Map.entry("arp_failure", Map.of("enabled", true))
))
.build());
}
}
resources:
alarmtemplateOne:
type: junipermist:org:Alarmtemplate
name: alarmtemplate_one
properties:
orgId: ${terraformTest.id}
name: alarmtemplate_one
delivery:
enabled: true
to_org_admins: true
additional_emails:
- admin@mycorp.net
rules:
health_check_failed:
enabled: true
insufficient_capacity:
enabled: true
insufficient_coverage:
enabled: true
infra_arp_failure:
enabled: true
arp_failure:
enabled: true
Create Alarmtemplate Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Alarmtemplate(name: string, args: AlarmtemplateArgs, opts?: CustomResourceOptions);
@overload
def Alarmtemplate(resource_name: str,
args: AlarmtemplateArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Alarmtemplate(resource_name: str,
opts: Optional[ResourceOptions] = None,
delivery: Optional[AlarmtemplateDeliveryArgs] = None,
org_id: Optional[str] = None,
rules: Optional[Mapping[str, AlarmtemplateRulesArgs]] = None,
name: Optional[str] = None)
func NewAlarmtemplate(ctx *Context, name string, args AlarmtemplateArgs, opts ...ResourceOption) (*Alarmtemplate, error)
public Alarmtemplate(string name, AlarmtemplateArgs args, CustomResourceOptions? opts = null)
public Alarmtemplate(String name, AlarmtemplateArgs args)
public Alarmtemplate(String name, AlarmtemplateArgs args, CustomResourceOptions options)
type: junipermist:org:Alarmtemplate
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 AlarmtemplateArgs
- 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 AlarmtemplateArgs
- 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 AlarmtemplateArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AlarmtemplateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AlarmtemplateArgs
- 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 alarmtemplateResource = new JuniperMist.Org.Alarmtemplate("alarmtemplateResource", new()
{
Delivery = new JuniperMist.Org.Inputs.AlarmtemplateDeliveryArgs
{
Enabled = false,
AdditionalEmails = new[]
{
"string",
},
ToOrgAdmins = false,
ToSiteAdmins = false,
},
OrgId = "string",
Rules =
{
{ "string", new JuniperMist.Org.Inputs.AlarmtemplateRulesArgs
{
Delivery = new JuniperMist.Org.Inputs.AlarmtemplateRulesDeliveryArgs
{
Enabled = false,
AdditionalEmails = new[]
{
"string",
},
ToOrgAdmins = false,
ToSiteAdmins = false,
},
Enabled = false,
} },
},
Name = "string",
});
example, err := org.NewAlarmtemplate(ctx, "alarmtemplateResource", &org.AlarmtemplateArgs{
Delivery: &org.AlarmtemplateDeliveryArgs{
Enabled: pulumi.Bool(false),
AdditionalEmails: pulumi.StringArray{
pulumi.String("string"),
},
ToOrgAdmins: pulumi.Bool(false),
ToSiteAdmins: pulumi.Bool(false),
},
OrgId: pulumi.String("string"),
Rules: org.AlarmtemplateRulesMap{
"string": &org.AlarmtemplateRulesArgs{
Delivery: &org.AlarmtemplateRulesDeliveryArgs{
Enabled: pulumi.Bool(false),
AdditionalEmails: pulumi.StringArray{
pulumi.String("string"),
},
ToOrgAdmins: pulumi.Bool(false),
ToSiteAdmins: pulumi.Bool(false),
},
Enabled: pulumi.Bool(false),
},
},
Name: pulumi.String("string"),
})
var alarmtemplateResource = new Alarmtemplate("alarmtemplateResource", AlarmtemplateArgs.builder()
.delivery(AlarmtemplateDeliveryArgs.builder()
.enabled(false)
.additionalEmails("string")
.toOrgAdmins(false)
.toSiteAdmins(false)
.build())
.orgId("string")
.rules(Map.of("string", Map.ofEntries(
Map.entry("delivery", Map.ofEntries(
Map.entry("enabled", false),
Map.entry("additionalEmails", "string"),
Map.entry("toOrgAdmins", false),
Map.entry("toSiteAdmins", false)
)),
Map.entry("enabled", false)
)))
.name("string")
.build());
alarmtemplate_resource = junipermist.org.Alarmtemplate("alarmtemplateResource",
delivery={
"enabled": False,
"additional_emails": ["string"],
"to_org_admins": False,
"to_site_admins": False,
},
org_id="string",
rules={
"string": {
"delivery": {
"enabled": False,
"additional_emails": ["string"],
"to_org_admins": False,
"to_site_admins": False,
},
"enabled": False,
},
},
name="string")
const alarmtemplateResource = new junipermist.org.Alarmtemplate("alarmtemplateResource", {
delivery: {
enabled: false,
additionalEmails: ["string"],
toOrgAdmins: false,
toSiteAdmins: false,
},
orgId: "string",
rules: {
string: {
delivery: {
enabled: false,
additionalEmails: ["string"],
toOrgAdmins: false,
toSiteAdmins: false,
},
enabled: false,
},
},
name: "string",
});
type: junipermist:org:Alarmtemplate
properties:
delivery:
additionalEmails:
- string
enabled: false
toOrgAdmins: false
toSiteAdmins: false
name: string
orgId: string
rules:
string:
delivery:
additionalEmails:
- string
enabled: false
toOrgAdmins: false
toSiteAdmins: false
enabled: false
Alarmtemplate 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 Alarmtemplate resource accepts the following input properties:
- Delivery
Pulumi.
Juniper Mist. Org. Inputs. Alarmtemplate Delivery - Delivery object to configure the alarm delivery
- Org
Id string - Rules
Dictionary<string, Pulumi.
Juniper Mist. Org. Inputs. Alarmtemplate Rules Args> - Alarm Rules object to configure the individual alarm keys/types. Property key is the alarm name (list available with the
junipermist.getConstAlarms
data source). - Name string
- Some string to name the alarm template
- Delivery
Alarmtemplate
Delivery Args - Delivery object to configure the alarm delivery
- Org
Id string - Rules
map[string]Alarmtemplate
Rules Args - Alarm Rules object to configure the individual alarm keys/types. Property key is the alarm name (list available with the
junipermist.getConstAlarms
data source). - Name string
- Some string to name the alarm template
- delivery
Alarmtemplate
Delivery - Delivery object to configure the alarm delivery
- org
Id String - rules
Map<String,Alarmtemplate
Rules Args> - Alarm Rules object to configure the individual alarm keys/types. Property key is the alarm name (list available with the
junipermist.getConstAlarms
data source). - name String
- Some string to name the alarm template
- delivery
Alarmtemplate
Delivery - Delivery object to configure the alarm delivery
- org
Id string - rules
{[key: string]: Alarmtemplate
Rules Args} - Alarm Rules object to configure the individual alarm keys/types. Property key is the alarm name (list available with the
junipermist.getConstAlarms
data source). - name string
- Some string to name the alarm template
- delivery
Alarmtemplate
Delivery Args - Delivery object to configure the alarm delivery
- org_
id str - rules
Mapping[str, Alarmtemplate
Rules Args] - Alarm Rules object to configure the individual alarm keys/types. Property key is the alarm name (list available with the
junipermist.getConstAlarms
data source). - name str
- Some string to name the alarm template
- delivery Property Map
- Delivery object to configure the alarm delivery
- org
Id String - rules Map<Property Map>
- Alarm Rules object to configure the individual alarm keys/types. Property key is the alarm name (list available with the
junipermist.getConstAlarms
data source). - name String
- Some string to name the alarm template
Outputs
All input properties are implicitly available as output properties. Additionally, the Alarmtemplate 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 Alarmtemplate Resource
Get an existing Alarmtemplate 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?: AlarmtemplateState, opts?: CustomResourceOptions): Alarmtemplate
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
delivery: Optional[AlarmtemplateDeliveryArgs] = None,
name: Optional[str] = None,
org_id: Optional[str] = None,
rules: Optional[Mapping[str, AlarmtemplateRulesArgs]] = None) -> Alarmtemplate
func GetAlarmtemplate(ctx *Context, name string, id IDInput, state *AlarmtemplateState, opts ...ResourceOption) (*Alarmtemplate, error)
public static Alarmtemplate Get(string name, Input<string> id, AlarmtemplateState? state, CustomResourceOptions? opts = null)
public static Alarmtemplate get(String name, Output<String> id, AlarmtemplateState 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.
- Delivery
Pulumi.
Juniper Mist. Org. Inputs. Alarmtemplate Delivery - Delivery object to configure the alarm delivery
- Name string
- Some string to name the alarm template
- Org
Id string - Rules
Dictionary<string, Pulumi.
Juniper Mist. Org. Inputs. Alarmtemplate Rules Args> - Alarm Rules object to configure the individual alarm keys/types. Property key is the alarm name (list available with the
junipermist.getConstAlarms
data source).
- Delivery
Alarmtemplate
Delivery Args - Delivery object to configure the alarm delivery
- Name string
- Some string to name the alarm template
- Org
Id string - Rules
map[string]Alarmtemplate
Rules Args - Alarm Rules object to configure the individual alarm keys/types. Property key is the alarm name (list available with the
junipermist.getConstAlarms
data source).
- delivery
Alarmtemplate
Delivery - Delivery object to configure the alarm delivery
- name String
- Some string to name the alarm template
- org
Id String - rules
Map<String,Alarmtemplate
Rules Args> - Alarm Rules object to configure the individual alarm keys/types. Property key is the alarm name (list available with the
junipermist.getConstAlarms
data source).
- delivery
Alarmtemplate
Delivery - Delivery object to configure the alarm delivery
- name string
- Some string to name the alarm template
- org
Id string - rules
{[key: string]: Alarmtemplate
Rules Args} - Alarm Rules object to configure the individual alarm keys/types. Property key is the alarm name (list available with the
junipermist.getConstAlarms
data source).
- delivery
Alarmtemplate
Delivery Args - Delivery object to configure the alarm delivery
- name str
- Some string to name the alarm template
- org_
id str - rules
Mapping[str, Alarmtemplate
Rules Args] - Alarm Rules object to configure the individual alarm keys/types. Property key is the alarm name (list available with the
junipermist.getConstAlarms
data source).
- delivery Property Map
- Delivery object to configure the alarm delivery
- name String
- Some string to name the alarm template
- org
Id String - rules Map<Property Map>
- Alarm Rules object to configure the individual alarm keys/types. Property key is the alarm name (list available with the
junipermist.getConstAlarms
data source).
Supporting Types
AlarmtemplateDelivery, AlarmtemplateDeliveryArgs
- Enabled bool
- Whether to enable the alarm delivery via emails or not
- Additional
Emails List<string> - List of additional email string to deliver the alarms via emails
- To
Org boolAdmins - Whether to deliver the alarms via emails to Org admins or not
- To
Site boolAdmins - Whether to deliver the alarms via emails to Site admins or not
- Enabled bool
- Whether to enable the alarm delivery via emails or not
- Additional
Emails []string - List of additional email string to deliver the alarms via emails
- To
Org boolAdmins - Whether to deliver the alarms via emails to Org admins or not
- To
Site boolAdmins - Whether to deliver the alarms via emails to Site admins or not
- enabled Boolean
- Whether to enable the alarm delivery via emails or not
- additional
Emails List<String> - List of additional email string to deliver the alarms via emails
- to
Org BooleanAdmins - Whether to deliver the alarms via emails to Org admins or not
- to
Site BooleanAdmins - Whether to deliver the alarms via emails to Site admins or not
- enabled boolean
- Whether to enable the alarm delivery via emails or not
- additional
Emails string[] - List of additional email string to deliver the alarms via emails
- to
Org booleanAdmins - Whether to deliver the alarms via emails to Org admins or not
- to
Site booleanAdmins - Whether to deliver the alarms via emails to Site admins or not
- enabled bool
- Whether to enable the alarm delivery via emails or not
- additional_
emails Sequence[str] - List of additional email string to deliver the alarms via emails
- to_
org_ booladmins - Whether to deliver the alarms via emails to Org admins or not
- to_
site_ booladmins - Whether to deliver the alarms via emails to Site admins or not
- enabled Boolean
- Whether to enable the alarm delivery via emails or not
- additional
Emails List<String> - List of additional email string to deliver the alarms via emails
- to
Org BooleanAdmins - Whether to deliver the alarms via emails to Org admins or not
- to
Site BooleanAdmins - Whether to deliver the alarms via emails to Site admins or not
AlarmtemplateRules, AlarmtemplateRulesArgs
- Delivery
Pulumi.
Juniper Mist. Org. Inputs. Alarmtemplate Rules Delivery - Delivery object to configure the alarm delivery
- Enabled bool
- Delivery
Alarmtemplate
Rules Delivery - Delivery object to configure the alarm delivery
- Enabled bool
- delivery
Alarmtemplate
Rules Delivery - Delivery object to configure the alarm delivery
- enabled Boolean
- delivery
Alarmtemplate
Rules Delivery - Delivery object to configure the alarm delivery
- enabled boolean
- delivery
Alarmtemplate
Rules Delivery - Delivery object to configure the alarm delivery
- enabled bool
- delivery Property Map
- Delivery object to configure the alarm delivery
- enabled Boolean
AlarmtemplateRulesDelivery, AlarmtemplateRulesDeliveryArgs
- Enabled bool
- Whether to enable the alarm delivery via emails or not
- Additional
Emails List<string> - List of additional email string to deliver the alarms via emails
- To
Org boolAdmins - Whether to deliver the alarms via emails to Org admins or not
- To
Site boolAdmins - Whether to deliver the alarms via emails to Site admins or not
- Enabled bool
- Whether to enable the alarm delivery via emails or not
- Additional
Emails []string - List of additional email string to deliver the alarms via emails
- To
Org boolAdmins - Whether to deliver the alarms via emails to Org admins or not
- To
Site boolAdmins - Whether to deliver the alarms via emails to Site admins or not
- enabled Boolean
- Whether to enable the alarm delivery via emails or not
- additional
Emails List<String> - List of additional email string to deliver the alarms via emails
- to
Org BooleanAdmins - Whether to deliver the alarms via emails to Org admins or not
- to
Site BooleanAdmins - Whether to deliver the alarms via emails to Site admins or not
- enabled boolean
- Whether to enable the alarm delivery via emails or not
- additional
Emails string[] - List of additional email string to deliver the alarms via emails
- to
Org booleanAdmins - Whether to deliver the alarms via emails to Org admins or not
- to
Site booleanAdmins - Whether to deliver the alarms via emails to Site admins or not
- enabled bool
- Whether to enable the alarm delivery via emails or not
- additional_
emails Sequence[str] - List of additional email string to deliver the alarms via emails
- to_
org_ booladmins - Whether to deliver the alarms via emails to Org admins or not
- to_
site_ booladmins - Whether to deliver the alarms via emails to Site admins or not
- enabled Boolean
- Whether to enable the alarm delivery via emails or not
- additional
Emails List<String> - List of additional email string to deliver the alarms via emails
- to
Org BooleanAdmins - Whether to deliver the alarms via emails to Org admins or not
- to
Site BooleanAdmins - Whether to deliver the alarms via emails to Site admins or not
Import
Using pulumi import
, import mist_org_alarmtemplate
with:
Org RF Template can be imported by specifying the org_id and the alarmtemplate_id
$ pulumi import junipermist:org/alarmtemplate:Alarmtemplate alarmtemplate_one 17b46405-3a6d-4715-8bb4-6bb6d06f316a.d3c42998-9012-4859-9743-6b9bee475309
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- junipermist pulumi/pulumi-junipermist
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
mist
Terraform Provider.