impart.Monitor
Explore with Pulumi AI
Manage a monitor.
Example Usage
Coming soon!
Coming soon!
Coming soon!
Coming soon!
Coming soon!
resources:
  # Create a new event monitor
  testEvent:
    type: impart:Monitor
    properties:
      conditions:
        - comparator: gt
          delay: 0
          details:
            - action: api_access_token_created
              actorType: user_id
              subjectType: api_access_token_id
              type: event
          threshold: 1
          time_period: 60000
      description: test event monitor
      name: terraform_event_monitor
      notificationTemplateIds:
        - <notification_template_id>
  # Create a new metric monitor
  testMetric:
    type: impart:Monitor
    properties:
      conditions:
        - comparator: lt
          delay: 0
          details:
            - tag: http-request
              type: metric
          threshold: 1
          time_period: 60000
      description: test event monitor
      name: terraform_event_monitor
      notificationTemplateIds:
        - <notification_template_id>
Create Monitor Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Monitor(name: string, args: MonitorArgs, opts?: CustomResourceOptions);@overload
def Monitor(resource_name: str,
            args: MonitorArgs,
            opts: Optional[ResourceOptions] = None)
@overload
def Monitor(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            conditions: Optional[Sequence[MonitorConditionArgs]] = None,
            description: Optional[str] = None,
            name: Optional[str] = None,
            notification_template_ids: Optional[Sequence[str]] = None,
            labels: Optional[Sequence[str]] = None)func NewMonitor(ctx *Context, name string, args MonitorArgs, opts ...ResourceOption) (*Monitor, error)public Monitor(string name, MonitorArgs args, CustomResourceOptions? opts = null)
public Monitor(String name, MonitorArgs args)
public Monitor(String name, MonitorArgs args, CustomResourceOptions options)
type: impart:Monitor
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 MonitorArgs
- 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 MonitorArgs
- 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 MonitorArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MonitorArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args MonitorArgs
- 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 monitorResource = new Impart.Monitor("monitorResource", new()
{
    Conditions = new[]
    {
        new Impart.Inputs.MonitorConditionArgs
        {
            Comparator = "string",
            Delay = 0,
            Details = new Impart.Inputs.MonitorConditionDetailsArgs
            {
                Type = "string",
                Action = "string",
                ActorType = "string",
                SubjectType = "string",
                Tag = "string",
            },
            Threshold = 0,
            TimePeriod = 0,
        },
    },
    Description = "string",
    Name = "string",
    NotificationTemplateIds = new[]
    {
        "string",
    },
    Labels = new[]
    {
        "string",
    },
});
example, err := impart.NewMonitor(ctx, "monitorResource", &impart.MonitorArgs{
	Conditions: impart.MonitorConditionArray{
		&impart.MonitorConditionArgs{
			Comparator: pulumi.String("string"),
			Delay:      pulumi.Int(0),
			Details: &impart.MonitorConditionDetailsArgs{
				Type:        pulumi.String("string"),
				Action:      pulumi.String("string"),
				ActorType:   pulumi.String("string"),
				SubjectType: pulumi.String("string"),
				Tag:         pulumi.String("string"),
			},
			Threshold:  pulumi.Int(0),
			TimePeriod: pulumi.Int(0),
		},
	},
	Description: pulumi.String("string"),
	Name:        pulumi.String("string"),
	NotificationTemplateIds: pulumi.StringArray{
		pulumi.String("string"),
	},
	Labels: pulumi.StringArray{
		pulumi.String("string"),
	},
})
var monitorResource = new Monitor("monitorResource", MonitorArgs.builder()
    .conditions(MonitorConditionArgs.builder()
        .comparator("string")
        .delay(0)
        .details(MonitorConditionDetailsArgs.builder()
            .type("string")
            .action("string")
            .actorType("string")
            .subjectType("string")
            .tag("string")
            .build())
        .threshold(0)
        .timePeriod(0)
        .build())
    .description("string")
    .name("string")
    .notificationTemplateIds("string")
    .labels("string")
    .build());
monitor_resource = impart.Monitor("monitorResource",
    conditions=[{
        "comparator": "string",
        "delay": 0,
        "details": {
            "type": "string",
            "action": "string",
            "actor_type": "string",
            "subject_type": "string",
            "tag": "string",
        },
        "threshold": 0,
        "time_period": 0,
    }],
    description="string",
    name="string",
    notification_template_ids=["string"],
    labels=["string"])
const monitorResource = new impart.Monitor("monitorResource", {
    conditions: [{
        comparator: "string",
        delay: 0,
        details: {
            type: "string",
            action: "string",
            actorType: "string",
            subjectType: "string",
            tag: "string",
        },
        threshold: 0,
        timePeriod: 0,
    }],
    description: "string",
    name: "string",
    notificationTemplateIds: ["string"],
    labels: ["string"],
});
type: impart:Monitor
properties:
    conditions:
        - comparator: string
          delay: 0
          details:
            action: string
            actorType: string
            subjectType: string
            tag: string
            type: string
          threshold: 0
          timePeriod: 0
    description: string
    labels:
        - string
    name: string
    notificationTemplateIds:
        - string
Monitor 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 Monitor resource accepts the following input properties:
- Conditions
List<MonitorCondition> 
- An array of conditions for which the monitor will trigger.
- Description string
- The description for this monitor.
- Name string
- The name for this monitor.
- NotificationTemplate List<string>Ids 
- An array of notification template ids for the templates that will send notifications to their respective connectors.
- Labels List<string>
- The applied labels.
- Conditions
[]MonitorCondition Args 
- An array of conditions for which the monitor will trigger.
- Description string
- The description for this monitor.
- Name string
- The name for this monitor.
- NotificationTemplate []stringIds 
- An array of notification template ids for the templates that will send notifications to their respective connectors.
- Labels []string
- The applied labels.
- conditions
List<MonitorCondition> 
- An array of conditions for which the monitor will trigger.
- description String
- The description for this monitor.
- name String
- The name for this monitor.
- notificationTemplate List<String>Ids 
- An array of notification template ids for the templates that will send notifications to their respective connectors.
- labels List<String>
- The applied labels.
- conditions
MonitorCondition[] 
- An array of conditions for which the monitor will trigger.
- description string
- The description for this monitor.
- name string
- The name for this monitor.
- notificationTemplate string[]Ids 
- An array of notification template ids for the templates that will send notifications to their respective connectors.
- labels string[]
- The applied labels.
- conditions
Sequence[MonitorCondition Args] 
- An array of conditions for which the monitor will trigger.
- description str
- The description for this monitor.
- name str
- The name for this monitor.
- notification_template_ Sequence[str]ids 
- An array of notification template ids for the templates that will send notifications to their respective connectors.
- labels Sequence[str]
- The applied labels.
- conditions List<Property Map>
- An array of conditions for which the monitor will trigger.
- description String
- The description for this monitor.
- name String
- The name for this monitor.
- notificationTemplate List<String>Ids 
- An array of notification template ids for the templates that will send notifications to their respective connectors.
- labels List<String>
- The applied labels.
Outputs
All input properties are implicitly available as output properties. Additionally, the Monitor 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 Monitor Resource
Get an existing Monitor 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?: MonitorState, opts?: CustomResourceOptions): Monitor@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        conditions: Optional[Sequence[MonitorConditionArgs]] = None,
        description: Optional[str] = None,
        labels: Optional[Sequence[str]] = None,
        name: Optional[str] = None,
        notification_template_ids: Optional[Sequence[str]] = None) -> Monitorfunc GetMonitor(ctx *Context, name string, id IDInput, state *MonitorState, opts ...ResourceOption) (*Monitor, error)public static Monitor Get(string name, Input<string> id, MonitorState? state, CustomResourceOptions? opts = null)public static Monitor get(String name, Output<String> id, MonitorState state, CustomResourceOptions options)resources:  _:    type: impart:Monitor    get:      id: ${id}- 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.
- Conditions
List<MonitorCondition> 
- An array of conditions for which the monitor will trigger.
- Description string
- The description for this monitor.
- Labels List<string>
- The applied labels.
- Name string
- The name for this monitor.
- NotificationTemplate List<string>Ids 
- An array of notification template ids for the templates that will send notifications to their respective connectors.
- Conditions
[]MonitorCondition Args 
- An array of conditions for which the monitor will trigger.
- Description string
- The description for this monitor.
- Labels []string
- The applied labels.
- Name string
- The name for this monitor.
- NotificationTemplate []stringIds 
- An array of notification template ids for the templates that will send notifications to their respective connectors.
- conditions
List<MonitorCondition> 
- An array of conditions for which the monitor will trigger.
- description String
- The description for this monitor.
- labels List<String>
- The applied labels.
- name String
- The name for this monitor.
- notificationTemplate List<String>Ids 
- An array of notification template ids for the templates that will send notifications to their respective connectors.
- conditions
MonitorCondition[] 
- An array of conditions for which the monitor will trigger.
- description string
- The description for this monitor.
- labels string[]
- The applied labels.
- name string
- The name for this monitor.
- notificationTemplate string[]Ids 
- An array of notification template ids for the templates that will send notifications to their respective connectors.
- conditions
Sequence[MonitorCondition Args] 
- An array of conditions for which the monitor will trigger.
- description str
- The description for this monitor.
- labels Sequence[str]
- The applied labels.
- name str
- The name for this monitor.
- notification_template_ Sequence[str]ids 
- An array of notification template ids for the templates that will send notifications to their respective connectors.
- conditions List<Property Map>
- An array of conditions for which the monitor will trigger.
- description String
- The description for this monitor.
- labels List<String>
- The applied labels.
- name String
- The name for this monitor.
- notificationTemplate List<String>Ids 
- An array of notification template ids for the templates that will send notifications to their respective connectors.
Supporting Types
MonitorCondition, MonitorConditionArgs    
- Comparator string
- Greater than, equal to, or less than (should be one of 'gt', 'lt', or 'eq')
- Delay int
- In milliseconds, the offset from now() for the time window.
- Details
MonitorCondition Details 
- Threshold int
- Number of occurrences that need to execute to have this condition be true.
- TimePeriod int
- In milliseconds, the time span from now until when we should be counting events (for example, 60000 is all events in the last minute).
- Comparator string
- Greater than, equal to, or less than (should be one of 'gt', 'lt', or 'eq')
- Delay int
- In milliseconds, the offset from now() for the time window.
- Details
MonitorCondition Details 
- Threshold int
- Number of occurrences that need to execute to have this condition be true.
- TimePeriod int
- In milliseconds, the time span from now until when we should be counting events (for example, 60000 is all events in the last minute).
- comparator String
- Greater than, equal to, or less than (should be one of 'gt', 'lt', or 'eq')
- delay Integer
- In milliseconds, the offset from now() for the time window.
- details
MonitorCondition Details 
- threshold Integer
- Number of occurrences that need to execute to have this condition be true.
- timePeriod Integer
- In milliseconds, the time span from now until when we should be counting events (for example, 60000 is all events in the last minute).
- comparator string
- Greater than, equal to, or less than (should be one of 'gt', 'lt', or 'eq')
- delay number
- In milliseconds, the offset from now() for the time window.
- details
MonitorCondition Details 
- threshold number
- Number of occurrences that need to execute to have this condition be true.
- timePeriod number
- In milliseconds, the time span from now until when we should be counting events (for example, 60000 is all events in the last minute).
- comparator str
- Greater than, equal to, or less than (should be one of 'gt', 'lt', or 'eq')
- delay int
- In milliseconds, the offset from now() for the time window.
- details
MonitorCondition Details 
- threshold int
- Number of occurrences that need to execute to have this condition be true.
- time_period int
- In milliseconds, the time span from now until when we should be counting events (for example, 60000 is all events in the last minute).
- comparator String
- Greater than, equal to, or less than (should be one of 'gt', 'lt', or 'eq')
- delay Number
- In milliseconds, the offset from now() for the time window.
- details Property Map
- threshold Number
- Number of occurrences that need to execute to have this condition be true.
- timePeriod Number
- In milliseconds, the time span from now until when we should be counting events (for example, 60000 is all events in the last minute).
MonitorConditionDetails, MonitorConditionDetailsArgs      
- Type string
- The type of monitor (should be one of 'event' or 'metric'
- Action string
- Strictly for event type monitors. A slug of the action the monitor is tracking.
- ActorType string
- Strictly for event type monitors. A slug of the actor type the monitor is tracking.
- SubjectType string
- Strictly for event type monitors. A slug of the subject type the monitor is tracking.
- Tag string
- Strictly for metric type monitors. The tag the monitor is tracking.
- Type string
- The type of monitor (should be one of 'event' or 'metric'
- Action string
- Strictly for event type monitors. A slug of the action the monitor is tracking.
- ActorType string
- Strictly for event type monitors. A slug of the actor type the monitor is tracking.
- SubjectType string
- Strictly for event type monitors. A slug of the subject type the monitor is tracking.
- Tag string
- Strictly for metric type monitors. The tag the monitor is tracking.
- type String
- The type of monitor (should be one of 'event' or 'metric'
- action String
- Strictly for event type monitors. A slug of the action the monitor is tracking.
- actorType String
- Strictly for event type monitors. A slug of the actor type the monitor is tracking.
- subjectType String
- Strictly for event type monitors. A slug of the subject type the monitor is tracking.
- tag String
- Strictly for metric type monitors. The tag the monitor is tracking.
- type string
- The type of monitor (should be one of 'event' or 'metric'
- action string
- Strictly for event type monitors. A slug of the action the monitor is tracking.
- actorType string
- Strictly for event type monitors. A slug of the actor type the monitor is tracking.
- subjectType string
- Strictly for event type monitors. A slug of the subject type the monitor is tracking.
- tag string
- Strictly for metric type monitors. The tag the monitor is tracking.
- type str
- The type of monitor (should be one of 'event' or 'metric'
- action str
- Strictly for event type monitors. A slug of the action the monitor is tracking.
- actor_type str
- Strictly for event type monitors. A slug of the actor type the monitor is tracking.
- subject_type str
- Strictly for event type monitors. A slug of the subject type the monitor is tracking.
- tag str
- Strictly for metric type monitors. The tag the monitor is tracking.
- type String
- The type of monitor (should be one of 'event' or 'metric'
- action String
- Strictly for event type monitors. A slug of the action the monitor is tracking.
- actorType String
- Strictly for event type monitors. A slug of the actor type the monitor is tracking.
- subjectType String
- Strictly for event type monitors. A slug of the subject type the monitor is tracking.
- tag String
- Strictly for metric type monitors. The tag the monitor is tracking.
Package Details
- Repository
- impart impart-security/pulumi-impart
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the impartTerraform Provider.