1. Packages
  2. Impart Security
  3. API Docs
  4. Monitor
Impart Security v0.5.0 published on Wednesday, Jun 12, 2024 by Impart Security

impart.Monitor

Explore with Pulumi AI

impart logo
Impart Security v0.5.0 published on Wednesday, Jun 12, 2024 by Impart Security

    Manage a monitor.

    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.impart.Monitor;
    import com.pulumi.impart.MonitorArgs;
    import com.pulumi.impart.inputs.MonitorConditionArgs;
    import com.pulumi.impart.inputs.MonitorConditionDetailsArgs;
    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 event monitor
            var testEvent = new Monitor("testEvent", MonitorArgs.builder()
                .name("terraform_event_monitor")
                .description("test event monitor")
                .notificationTemplateIds(resource.impart_notification_template().test().id())
                .conditions(MonitorConditionArgs.builder()
                    .threshold(1)
                    .comparator("gt")
                    .time_period(60000)
                    .delay(0)
                    .details(MonitorConditionDetailsArgs.builder()
                        .type("event")
                        .action("api_access_token_created")
                        .subjectType("api_access_token_id")
                        .actorType("user_id")
                        .build())
                    .build())
                .build());
    
            // Create a new metric monitor
            var testMetric = new Monitor("testMetric", MonitorArgs.builder()
                .name("terraform_event_monitor")
                .description("test event monitor")
                .notificationTemplateIds(resource.impart_notification_template().test().id())
                .conditions(MonitorConditionArgs.builder()
                    .threshold(1)
                    .comparator("lt")
                    .time_period(60000)
                    .delay(0)
                    .details(MonitorConditionDetailsArgs.builder()
                        .type("metric")
                        .tag("http-request")
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      # Create a new event monitor
      testEvent:
        type: impart:Monitor
        properties:
          name: terraform_event_monitor
          description: test event monitor
          notificationTemplateIds:
            - ${resource.impart_notification_template.test.id}
          conditions:
            - threshold: 1
              comparator: gt
              time_period: 60000
              delay: 0
              details:
                type: event
                action: api_access_token_created
                subjectType: api_access_token_id
                actorType: user_id
      # Create a new metric monitor
      testMetric:
        type: impart:Monitor
        properties:
          name: terraform_event_monitor
          description: test event monitor
          notificationTemplateIds:
            - ${resource.impart_notification_template.test.id}
          conditions:
            - threshold: 1
              comparator: lt
              time_period: 60000
              delay: 0
              details:
                type: metric
                tag: http-request
    

    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)
    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",
        },
    });
    
    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"),
    	},
    })
    
    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")
        .build());
    
    monitor_resource = impart.Monitor("monitorResource",
        conditions=[impart.MonitorConditionArgs(
            comparator="string",
            delay=0,
            details=impart.MonitorConditionDetailsArgs(
                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"])
    
    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"],
    });
    
    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
        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

    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.
    NotificationTemplateIds List<string>
    An array of notification template ids for the templates that will send notifications to their respective connectors.
    Conditions []MonitorConditionArgs
    An array of conditions for which the monitor will trigger.
    Description string
    The description for this monitor.
    Name string
    The name for this monitor.
    NotificationTemplateIds []string
    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.
    name String
    The name for this monitor.
    notificationTemplateIds List<String>
    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.
    name string
    The name for this monitor.
    notificationTemplateIds string[]
    An array of notification template ids for the templates that will send notifications to their respective connectors.
    conditions Sequence[MonitorConditionArgs]
    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_ids Sequence[str]
    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.
    name String
    The name for this monitor.
    notificationTemplateIds List<String>
    An array of notification template ids for the templates that will send notifications to their respective connectors.

    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,
            name: Optional[str] = None,
            notification_template_ids: Optional[Sequence[str]] = None) -> Monitor
    func 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)
    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:
    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.
    NotificationTemplateIds List<string>
    An array of notification template ids for the templates that will send notifications to their respective connectors.
    Conditions []MonitorConditionArgs
    An array of conditions for which the monitor will trigger.
    Description string
    The description for this monitor.
    Name string
    The name for this monitor.
    NotificationTemplateIds []string
    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.
    name String
    The name for this monitor.
    notificationTemplateIds List<String>
    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.
    name string
    The name for this monitor.
    notificationTemplateIds string[]
    An array of notification template ids for the templates that will send notifications to their respective connectors.
    conditions Sequence[MonitorConditionArgs]
    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_ids Sequence[str]
    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.
    name String
    The name for this monitor.
    notificationTemplateIds List<String>
    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 MonitorConditionDetails
    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 MonitorConditionDetails
    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 MonitorConditionDetails
    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 MonitorConditionDetails
    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 MonitorConditionDetails
    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 impart Terraform Provider.
    impart logo
    Impart Security v0.5.0 published on Wednesday, Jun 12, 2024 by Impart Security