Documentation
¶
Index ¶
- Variables
- func Bool(input bool) *bool
- func CheckpointID(input string) string
- func DeduplicateCheckpointIDs(input []interface{}) []int32
- func DeduplicateRegionIDs(input []interface{}) []int32
- func Float(input float64) *float64
- func Int(input int) *int
- func Int32(input int32) *int32
- func Int64(input int64) *int64
- func MergeSchema(input ...map[string]*schema.Schema) map[string]*schema.Schema
- func Provider() *schema.Provider
- func RegionID(idOrName string) string
- func ResourceMonitorCertificateSchema() *schema.Resource
- func ResourceMonitorDatabaseServerSchema() *schema.Resource
- func ResourceMonitorDnsSchema() *schema.Resource
- func ResourceMonitorFullPageCheckSchema() *schema.Resource
- func ResourceMonitorGroupSchema() *schema.Resource
- func ResourceMonitorNetworkSchema() *schema.Resource
- func ResourceMonitorWebSchema() *schema.Resource
- func ResourceOperatorAccountSchema() *schema.Resource
- func SliceInt32ToSliceString(input []int32) []string
- func SliceInterfaceToSliceInt32(input []interface{}) *[]int32
- func SliceInterfaceToSliceString(input []interface{}) []string
- func SliceStringToSliceInterface(input *[]string) []interface{}
- func String(input string) *string
- func UserAgent(input string) string
- type Uptrends
Constants ¶
This section is empty.
Variables ¶
View Source
var CheckpointNameToCheckpointID = reverseMap(checkpointIDToCheckpointName)
View Source
var MonitorGenericSchema = map[string]*schema.Schema{ "name": { Type: schema.TypeString, Required: true, Description: "Display name for the Ping Monitor resource.", ValidateFunc: validation.StringLenBetween(1, 64), }, "is_active": { Type: schema.TypeBool, Optional: true, Default: true, Description: "Indicates whether the monitor is actively running in the account. Defaults to `true`.", }, "generate_alert": { Type: schema.TypeBool, Optional: true, Default: true, Description: "When set to false, no alerts will be generated for this monitor in case of an error. Defaults to `true`.", }, "check_interval": { Type: schema.TypeInt, Optional: true, Default: 5, Description: "Numeric value for the time interval between individual checks, in minutes. The maximum value is 240 (4 hours). The minimum value depends on the type of monitor. Defaults to `5`.", ValidateFunc: validation.IntBetween(1, 240), }, "mode": { Type: schema.TypeString, Optional: true, Default: "Production", Description: "The monitor mode, either Development, Staging or Production. Defaults to `Production`. If monitoring mode is Development `is_active` has to be `false`", ValidateFunc: validation.StringInSlice([]string{"Development", "Staging", "Production"}, false), }, "notes": { Type: schema.TypeString, Optional: true, Description: "Your notes for this monitor.", ValidateFunc: validation.StringIsNotEmpty, }, "selected_checkpoints": { Type: schema.TypeList, Optional: true, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "checkpoints": { Type: schema.TypeSet, Optional: true, Description: "A checkpoint is a geographic location from which you can have your service uptime and performance checked periodically. Provide checkpoint ids or names.", Elem: &schema.Schema{ Type: schema.TypeString, StateFunc: func(v interface{}) string { return CheckpointID(v.(string)) }, }, }, "regions": { Type: schema.TypeSet, Optional: true, Description: "A Region contains one or more checkpoints, just define a region if all checkpoints in a region should be used. Provide region id or name.", Elem: &schema.Schema{ Type: schema.TypeString, StateFunc: func(v interface{}) string { return RegionID(v.(string)) }, }, }, "exclude_locations": { Type: schema.TypeSet, Optional: true, Description: "It is possible to keep an entire region of checkpoints (e.g. Canada) selected (with the benefit of automatically getting new checkpoints as they are added to that region) but have additional control over individual checkpoint locations that you want to skip. Provide checkpoint ids or names.", Elem: &schema.Schema{ Type: schema.TypeString, StateFunc: func(v interface{}) string { return CheckpointID(v.(string)) }, }, }, }, }, }, "primary_checkpoints_only": { Type: schema.TypeBool, Optional: true, Default: true, Description: "Only set this to False when you’re sure you want to execute your monitor on non-primary checkpoints. Defaults to `true`.", }, "is_locked": { Type: schema.TypeBool, Computed: true, Description: "It specifies whether the monitor is currently locked for editing. This happens if the Support team is reviewing your monitor.", }, "name_for_phone_alerts": { Type: schema.TypeString, Optional: true, Description: "The value for the speech-friendly monitor name, if applicable. This is the monitor name we’ll use in text-to-speech phone alerting, provided that the ‘Use alternate monitor names’ option has been enabled in the phone alert integration.", ValidateFunc: validation.StringIsNotEmpty, }, }
generic monitor fields - https://www.uptrends.com/support/kb/api/monitor-api-fields
View Source
var MonitorLoadTimeSchema = map[string]*schema.Schema{ "alert_on_load_time_limit_1": { Type: schema.TypeBool, Optional: true, Default: false, Description: "Set this value to true, if you want to receive alerts if your server response is slower than load_time_limit_1 threshold. Shows a yellow status in performance monitor. Defaults to `false`.", }, "load_time_limit_1": { Type: schema.TypeInt, Optional: true, Default: 2500, ValidateFunc: validation.IntBetween(1, 300000), Description: "Set threshold time in ms for requires `alert_on_load_time_limit_1` to be enabled. Defaults to `2500`.", }, "alert_on_load_time_limit_2": { Type: schema.TypeBool, Optional: true, Default: false, Description: "Set this value to true, if you want to receive alerts if your server response is slower than load_time_limit_2. Shows a red status in performance monitor. Defaults to `false`.", }, "load_time_limit_2": { Type: schema.TypeInt, Optional: true, Default: 5000, ValidateFunc: validation.IntBetween(1, 300000), Description: "Set threshold time in ms for requires `alert_on_load_time_limit_2` to be enabled. Defaults to `5000`.", }, }
View Source
var RegionIDToRegionName = map[string]string{
"13": "Austria",
"20": "Belgium",
"53": "Czech Republic",
"56": "Denmark",
"256": "Bulgaria",
"263": "Estonia",
"1001": "Africa",
"1002": "Asia",
"1003": "Australia",
"1004": "Europe",
"1005": "North America",
"1006": "South America",
"1007": "Middle East",
"1013": "Cyprus",
"1014": "Bosnia and Herzegovina",
}
View Source
var RegionNameToRegionID = reverseMap(RegionIDToRegionName)
Functions ¶
func CheckpointID ¶
CheckpointID accepts ID or checkpoint name and lookup ID
func DeduplicateCheckpointIDs ¶
func DeduplicateCheckpointIDs(input []interface{}) []int32
func DeduplicateRegionIDs ¶
func DeduplicateRegionIDs(input []interface{}) []int32
func MergeSchema ¶
MergeSchema will merge schemaA into schemaB and return a schema consist of both schemas
func SliceInt32ToSliceString ¶
SliceInt32ToSliceString convert []int32 to []string
func SliceInterfaceToSliceInt32 ¶
func SliceInterfaceToSliceInt32(input []interface{}) *[]int32
SliceInterfaceToSliceInt32 convert []interface{} to *[]int32
func SliceInterfaceToSliceString ¶
func SliceInterfaceToSliceString(input []interface{}) []string
SliceInterfaceToSliceString convert []interface{} to []string
func SliceStringToSliceInterface ¶
func SliceStringToSliceInterface(input *[]string) []interface{}
SliceStringToSliceInterface convert *[]string to []interface{}
Types ¶
Source Files
¶
- constants.go
- monitor_certificate_resource.go
- monitor_database_server_resource.go
- monitor_dns_resource.go
- monitor_fpc_resource.go
- monitor_group_resource.go
- monitor_network_resource.go
- monitor_web_resource.go
- operator_account_resource.go
- provider.go
- schema_monitor_generic.go
- schema_monitor_load_time.go
- util.go
Click to show internal directories.
Click to hide internal directories.