import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as checkly from "@checkly/pulumi"; * * // Basic TCP Check * const example_tcp_check = new checkly.TcpCheck("example-tcp-check", { * name: "Example TCP check", * activated: true, * shouldFail: false, * frequency: 1, * useGlobalAlertSettings: true, * locations: ["us-west-1"], * request: { * hostname: "api.checklyhq.com", * port: 80, * }, * }); * // A more complex example using assertions and setting alerts * const example_tcp_check_2 = new checkly.TcpCheck("example-tcp-check-2", { * name: "Example TCP check 2", * activated: true, * shouldFail: true, * frequency: 1, * degradedResponseTime: 5000, * maxResponseTime: 10000, * locations: [ * "us-west-1", * "ap-northeast-1", * "ap-south-1", * ], * alertSettings: { * escalationType: "RUN_BASED", * runBasedEscalations: [{ * failedRunThreshold: 1, * }], * reminders: [{ * amount: 1, * }], * }, * retryStrategy: { * type: "FIXED", * baseBackoffSeconds: 60, * maxDurationSeconds: 600, * maxRetries: 3, * sameRegion: false, * }, * request: { * hostname: "api.checklyhq.com", * port: 80, * data: "hello", * assertions: [ * { * source: "RESPONSE_DATA", * property: "", * comparison: "CONTAINS", * target: "welcome", * }, * { * source: "RESPONSE_TIME", * property: "", * comparison: "LESS_THAN", * target: "2000", * }, * ], * }, * }); * ``` */ export declare class TcpCheck extends pulumi.CustomResource { /** * Get an existing TcpCheck resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: TcpCheckState, opts?: pulumi.CustomResourceOptions): TcpCheck; /** * Returns true if the given object is an instance of TcpCheck. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is TcpCheck; /** * Determines if the check is running or not. Possible values `true`, and `false`. */ readonly activated: pulumi.Output; /** * An array of channel IDs and whether they're activated or not. If you don't set at least one alert channel subscription for your monitor, we won't be able to alert you even if it starts failing. */ readonly alertChannelSubscriptions: pulumi.Output; /** * Determines the alert escalation policy for the monitor. */ readonly alertSettings: pulumi.Output; /** * The response time in milliseconds starting from which a check should be considered degraded. Possible values are between 0 and 5000. (Default `4000`). */ readonly degradedResponseTime: pulumi.Output; /** * A description of the monitor. */ readonly description: pulumi.Output; /** * Controls how often the monitor should run. Defined in minutes. The allowed values are `0` (high frequency - use `frequencyOffset` to define the actual frequency), `1` (1 minute), `2` (2 minutes), `5` (5 minutes), `10` (10 minutes), `15` (15 minutes), `30` (30 minutes), `60` (1 hour), `120` (2 hours), `180` (3 hours), `360` (6 hours), `720` (12 hours) and `1440` (24 hours). */ readonly frequency: pulumi.Output; /** * When `frequency` is `0` (high frequency), `frequencyOffset` is required and it alone controls how often the monitor should run. Defined in seconds. The allowed values are `0` (disabled - use `frequency` to define the actual frequency), `10` (10 seconds), `20` (20 seconds) and `30` (30 seconds). */ readonly frequencyOffset: pulumi.Output; /** * The id of the check group this check is part of. */ readonly groupId: pulumi.Output; /** * The position of this check in a check group. It determines in what order checks are run when a group is triggered from the API or from CI/CD. */ readonly groupOrder: pulumi.Output; /** * An array of one or more data center locations where to run the this check. (Default ["us-east-1"]) */ readonly locations: pulumi.Output; /** * The response time in milliseconds starting from which a check should be considered failing. Possible values are between 0 and 5000. (Default `5000`). */ readonly maxResponseTime: pulumi.Output; /** * Determines if any notifications will be sent out when a check fails/degrades/recovers. */ readonly muted: pulumi.Output; /** * The name of the check. */ readonly name: pulumi.Output; /** * An array of one or more private locations slugs. */ readonly privateLocations: pulumi.Output; /** * The parameters for the TCP connection. */ readonly request: pulumi.Output; /** * A strategy for retrying failed check/monitor runs. */ readonly retryStrategy: pulumi.Output; /** * Determines if the check should run in all selected locations in parallel or round-robin. */ readonly runParallel: pulumi.Output; /** * The ID of the runtime to use for this check. */ readonly runtimeId: pulumi.Output; /** * Allows to invert the behaviour of when a check is considered to fail. */ readonly shouldFail: pulumi.Output; /** * A list of tags for organizing and filtering checks. */ readonly tags: pulumi.Output; /** * Create and resolve an incident based on the alert configuration. Useful for status page automation. */ readonly triggerIncident: pulumi.Output; /** * When true, the account level alert settings will be used, not the alert setting defined on this check. */ readonly useGlobalAlertSettings: pulumi.Output; /** * Create a TcpCheck resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: TcpCheckArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering TcpCheck resources. */ export interface TcpCheckState { /** * Determines if the check is running or not. Possible values `true`, and `false`. */ activated?: pulumi.Input; /** * An array of channel IDs and whether they're activated or not. If you don't set at least one alert channel subscription for your monitor, we won't be able to alert you even if it starts failing. */ alertChannelSubscriptions?: pulumi.Input[]>; /** * Determines the alert escalation policy for the monitor. */ alertSettings?: pulumi.Input; /** * The response time in milliseconds starting from which a check should be considered degraded. Possible values are between 0 and 5000. (Default `4000`). */ degradedResponseTime?: pulumi.Input; /** * A description of the monitor. */ description?: pulumi.Input; /** * Controls how often the monitor should run. Defined in minutes. The allowed values are `0` (high frequency - use `frequencyOffset` to define the actual frequency), `1` (1 minute), `2` (2 minutes), `5` (5 minutes), `10` (10 minutes), `15` (15 minutes), `30` (30 minutes), `60` (1 hour), `120` (2 hours), `180` (3 hours), `360` (6 hours), `720` (12 hours) and `1440` (24 hours). */ frequency?: pulumi.Input; /** * When `frequency` is `0` (high frequency), `frequencyOffset` is required and it alone controls how often the monitor should run. Defined in seconds. The allowed values are `0` (disabled - use `frequency` to define the actual frequency), `10` (10 seconds), `20` (20 seconds) and `30` (30 seconds). */ frequencyOffset?: pulumi.Input; /** * The id of the check group this check is part of. */ groupId?: pulumi.Input; /** * The position of this check in a check group. It determines in what order checks are run when a group is triggered from the API or from CI/CD. */ groupOrder?: pulumi.Input; /** * An array of one or more data center locations where to run the this check. (Default ["us-east-1"]) */ locations?: pulumi.Input[]>; /** * The response time in milliseconds starting from which a check should be considered failing. Possible values are between 0 and 5000. (Default `5000`). */ maxResponseTime?: pulumi.Input; /** * Determines if any notifications will be sent out when a check fails/degrades/recovers. */ muted?: pulumi.Input; /** * The name of the check. */ name?: pulumi.Input; /** * An array of one or more private locations slugs. */ privateLocations?: pulumi.Input[]>; /** * The parameters for the TCP connection. */ request?: pulumi.Input; /** * A strategy for retrying failed check/monitor runs. */ retryStrategy?: pulumi.Input; /** * Determines if the check should run in all selected locations in parallel or round-robin. */ runParallel?: pulumi.Input; /** * The ID of the runtime to use for this check. */ runtimeId?: pulumi.Input; /** * Allows to invert the behaviour of when a check is considered to fail. */ shouldFail?: pulumi.Input; /** * A list of tags for organizing and filtering checks. */ tags?: pulumi.Input[]>; /** * Create and resolve an incident based on the alert configuration. Useful for status page automation. */ triggerIncident?: pulumi.Input; /** * When true, the account level alert settings will be used, not the alert setting defined on this check. */ useGlobalAlertSettings?: pulumi.Input; } /** * The set of arguments for constructing a TcpCheck resource. */ export interface TcpCheckArgs { /** * Determines if the check is running or not. Possible values `true`, and `false`. */ activated: pulumi.Input; /** * An array of channel IDs and whether they're activated or not. If you don't set at least one alert channel subscription for your monitor, we won't be able to alert you even if it starts failing. */ alertChannelSubscriptions?: pulumi.Input[]>; /** * Determines the alert escalation policy for the monitor. */ alertSettings?: pulumi.Input; /** * The response time in milliseconds starting from which a check should be considered degraded. Possible values are between 0 and 5000. (Default `4000`). */ degradedResponseTime?: pulumi.Input; /** * A description of the monitor. */ description?: pulumi.Input; /** * Controls how often the monitor should run. Defined in minutes. The allowed values are `0` (high frequency - use `frequencyOffset` to define the actual frequency), `1` (1 minute), `2` (2 minutes), `5` (5 minutes), `10` (10 minutes), `15` (15 minutes), `30` (30 minutes), `60` (1 hour), `120` (2 hours), `180` (3 hours), `360` (6 hours), `720` (12 hours) and `1440` (24 hours). */ frequency: pulumi.Input; /** * When `frequency` is `0` (high frequency), `frequencyOffset` is required and it alone controls how often the monitor should run. Defined in seconds. The allowed values are `0` (disabled - use `frequency` to define the actual frequency), `10` (10 seconds), `20` (20 seconds) and `30` (30 seconds). */ frequencyOffset?: pulumi.Input; /** * The id of the check group this check is part of. */ groupId?: pulumi.Input; /** * The position of this check in a check group. It determines in what order checks are run when a group is triggered from the API or from CI/CD. */ groupOrder?: pulumi.Input; /** * An array of one or more data center locations where to run the this check. (Default ["us-east-1"]) */ locations?: pulumi.Input[]>; /** * The response time in milliseconds starting from which a check should be considered failing. Possible values are between 0 and 5000. (Default `5000`). */ maxResponseTime?: pulumi.Input; /** * Determines if any notifications will be sent out when a check fails/degrades/recovers. */ muted?: pulumi.Input; /** * The name of the check. */ name?: pulumi.Input; /** * An array of one or more private locations slugs. */ privateLocations?: pulumi.Input[]>; /** * The parameters for the TCP connection. */ request: pulumi.Input; /** * A strategy for retrying failed check/monitor runs. */ retryStrategy?: pulumi.Input; /** * Determines if the check should run in all selected locations in parallel or round-robin. */ runParallel?: pulumi.Input; /** * The ID of the runtime to use for this check. */ runtimeId?: pulumi.Input; /** * Allows to invert the behaviour of when a check is considered to fail. */ shouldFail?: pulumi.Input; /** * A list of tags for organizing and filtering checks. */ tags?: pulumi.Input[]>; /** * Create and resolve an incident based on the alert configuration. Useful for status page automation. */ triggerIncident?: pulumi.Input; /** * When true, the account level alert settings will be used, not the alert setting defined on this check. */ useGlobalAlertSettings?: pulumi.Input; }